Class LoggerFilterStore

All Implemented Interfaces:
Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, Filter, RandomAccess, SequencedCollection<Object>

public final class LoggerFilterStore extends ArrayList<Object> implements Filter
This class abuses the java.util.logging.* API to establish a VM-wide object store.
See Also:
  • Field Details

    • instance

      protected static Logger instance
      Hold the logger to prevent GC, weak-referenced globally.
  • Constructor Details

    • LoggerFilterStore

      public LoggerFilterStore()
      Creates the store.
  • Method Details

    • get

      public Object get(int index)
      Override
      Specified by:
      get in interface List<Object>
      Overrides:
      get in class ArrayList<Object>
    • isLoggable

      public boolean isLoggable(LogRecord record)
      Unused
      Specified by:
      isLoggable in interface Filter
    • inject

      public static final void inject()
      Injects the store.
    • getStore

      public static final ArrayList<Object> getStore()
      Returns a store object.
      Parameters:
      i - Store object index.
      clazz - Class marker.
      Returns:
      The object.