Class SizeOfFilterSource

  • All Implemented Interfaces:
    Filter

    public final class SizeOfFilterSource
    extends java.lang.Object
    implements Filter
    • Constructor Summary

      Constructors 
      Constructor Description
      SizeOfFilterSource​(boolean registerAnnotationFilter)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void applyMutators()  
      (package private) void applyMutators​(java.lang.ClassLoader classLoader)  
      SizeOfFilter[] getFilters()  
      void ignoreField​(java.lang.reflect.Field field)
      Adds a field to the ignore list.
      void ignoreInstancesOf​(java.lang.Class clazz, boolean strict)
      Adds the class to the ignore list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • filters

        private final java.util.concurrent.CopyOnWriteArrayList<SizeOfFilter> filters
    • Constructor Detail

      • SizeOfFilterSource

        public SizeOfFilterSource​(boolean registerAnnotationFilter)
    • Method Detail

      • applyMutators

        private void applyMutators()
      • applyMutators

        void applyMutators​(java.lang.ClassLoader classLoader)
      • ignoreInstancesOf

        public void ignoreInstancesOf​(java.lang.Class clazz,
                                      boolean strict)
        Description copied from interface: Filter
        Adds the class to the ignore list. Can be strict, or include subtypes
        Specified by:
        ignoreInstancesOf in interface Filter
        Parameters:
        clazz - the class to ignore
        strict - true if to be ignored strictly, or false to include sub-classes
      • ignoreField

        public void ignoreField​(java.lang.reflect.Field field)
        Description copied from interface: Filter
        Adds a field to the ignore list. When that field is walked to by the SizeOfEngine, it won't navigate the graph further
        Specified by:
        ignoreField in interface Filter
        Parameters:
        field - the field to stop navigating the graph at