Package org.forgerock.openig.heap
Class Heaplets
java.lang.Object
org.forgerock.openig.heap.Heaplets
Loads
Heaplet classes based on the class of object they create. Three methods of
locating the heaplet class are attempted, in the following order:
- The
Loaderclass attempts to locate aHeapletFactoryinterface implementation suitable for the class being created. - A nested
Heapletclass is searched for. Example: creatingcom.example.Foowould search for a heaplet class namedcom.example.Foo$Heaplet. - A standalone class with the name
Heapletappended. Example: creatingcom.example.Foowould search for a heaplet class namedcom.example.FooHeaplet.
-
Method Summary
Modifier and TypeMethodDescriptionfindHeapletClass(Class<?> c) Finds the heaplet class associated to the givenctype.static HeapletgetHeaplet(Class<?> c) Returns the heaplet that creates an instance of the specified class, ornullif no such heaplet could be found.
-
Method Details
-
getHeaplet
Returns the heaplet that creates an instance of the specified class, ornullif no such heaplet could be found.- Parameters:
c- the class that the heaplet is responsible for creating.- Returns:
- the heaplet that creates the specified class, or
nullif not found.
-
findHeapletClass
Finds the heaplet class associated to the givenctype.- Parameters:
c- type to find a heaplet for- Returns:
- an optional containing the heaplet class (if found), otherwise empty.
-