public abstract class TransitiveClosure extends Object
Some mechanisms only operate on nodes or edges, but due to limitations of inheritance we have combined these two here.
TraceLocal
Modifier and Type | Field and Description |
---|---|
protected int |
specializedScan
The specialized scan identifier
|
private static Class<?>[] |
specializedScans
Database of specialized scan classes.
|
Modifier | Constructor and Description |
---|---|
protected |
TransitiveClosure() |
protected |
TransitiveClosure(int specializedScan)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static Class<?> |
getSpecializedScanClass(int id)
Get the specialized scan with the given id.
|
void |
processEdge(ObjectReference source,
Address slot)
Trace an edge during GC.
|
void |
processNode(ObjectReference object)
Trace a node during GC.
|
static void |
registerSpecializedScan(int id,
Class<?> specializedScanClass)
A transitive closure has been created that is designed to work with a specialized scan method.
|
private static final Class<?>[] specializedScans
protected final int specializedScan
protected TransitiveClosure()
protected TransitiveClosure(int specializedScan)
specializedScan
- The specialized scan for this trace.public static void registerSpecializedScan(int id, Class<?> specializedScanClass)
id
- The method id to register.specializedScanClass
- The class to register.public static Class<?> getSpecializedScanClass(int id)
id
- the id of the specialized scanpublic void processEdge(ObjectReference source, Address slot)
source
- The source of the reference.slot
- The location containing the object reference.public void processNode(ObjectReference object)
object
- The object to be processed.