Class SizeOfEngineLoader

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static SizeOfEngineLoader INSTANCE
      The one and single instance of this class
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SizeOfEngine createSizeOfEngine​(int maxObjectCount, boolean abort, boolean silent)
      Creates a new instance of a SizeOfEngine
      boolean load​(java.lang.Class<? extends SizeOfEngineFactory> clazz, boolean reload)
      Tries to find a SizeOfEngineFactory instance that is assignable from clazz
      static SizeOfEngine newSizeOfEngine​(int maxObjectCount, boolean abort, boolean silent)
      Creates a new instance of a SizeOfEngine
      void reload()
      Reloads the factory using the ServiceLoader
      • Methods inherited from class java.lang.Object

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

      • INSTANCE

        public static final SizeOfEngineLoader INSTANCE
        The one and single instance of this class
    • Method Detail

      • newSizeOfEngine

        public static SizeOfEngine newSizeOfEngine​(int maxObjectCount,
                                                   boolean abort,
                                                   boolean silent)
        Creates a new instance of a SizeOfEngine
        Parameters:
        maxObjectCount - the max object graph that will be traversed.
        abort - true if the object traversal should be aborted when the max depth is exceeded
        silent - true if no info log explaining which agent was chosen should be printed
        Returns:
        the new instance
      • createSizeOfEngine

        public SizeOfEngine createSizeOfEngine​(int maxObjectCount,
                                               boolean abort,
                                               boolean silent)
        Creates a new instance of a SizeOfEngine
        Specified by:
        createSizeOfEngine in interface SizeOfEngineFactory
        Parameters:
        maxObjectCount - the max object graph that will be traversed.
        abort - true if the object traversal should be aborted when the max depth is exceeded
        silent - true if no info log explaining which agent was chosen should be printed
        Returns:
        the new instance
      • reload

        public void reload()
        Reloads the factory using the ServiceLoader
      • load

        public boolean load​(java.lang.Class<? extends SizeOfEngineFactory> clazz,
                            boolean reload)
        Tries to find a SizeOfEngineFactory instance that is assignable from clazz
        Parameters:
        clazz - the class
        reload - whether to force a reload of the ServiceLoader
        Returns:
        true if succeeded otherwise, false