Package org.forgerock.openig.heap
Class Heaplets
- java.lang.Object
-
- org.forgerock.openig.heap.Heaplets
-
public final class Heaplets extends Object
LoadsHeaplet
classes based on the class of object they create. Three methods of locating the heaplet class are attempted, in the following order:- The
Loader
class attempts to locate aHeapletFactory
interface implementation suitable for the class being created. - A nested
Heaplet
class is searched for. Example: creatingcom.example.Foo
would search for a heaplet class namedcom.example.Foo$Heaplet
. - A standalone class with the name
Heaplet
appended. Example: creatingcom.example.Foo
would 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 givenc
type.static Heaplet
getHeaplet(Class<?> c)
Returns the heaplet that creates an instance of the specified class, ornull
if 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, ornull
if 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
null
if not found.
-
-