Package org.forgerock.openig.heap
Class Heaplets
- java.lang.Object
-
- org.forgerock.openig.heap.Heaplets
-
public final class Heaplets extends Object
LoadsHeapletclasses 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.
- The
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<Class<? extends Heaplet>>findHeapletClass(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 Detail
-
getHeaplet
public static Heaplet getHeaplet(Class<?> c)
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.
-
-