Class DTFJJavaReference
java.lang.Object
com.ibm.j9ddr.vm29.view.dtfj.java.DTFJJavaReference
- All Implemented Interfaces:
JavaReference
JavaReference is intended to represent either a standard reference within a java heap,
for example a reference from one object to another, or a root. A root is a reference
that is held outside of the heap, in the Java stack or within the JVM itself.
-
Field Summary
Fields declared in interface JavaReference
HEAP_ROOT_CLASSLOADER, HEAP_ROOT_FINALIZABLE_OBJ, HEAP_ROOT_JNI_GLOBAL, HEAP_ROOT_JNI_LOCAL, HEAP_ROOT_MONITOR, HEAP_ROOT_OTHER, HEAP_ROOT_STACK_LOCAL, HEAP_ROOT_STRINGTABLE, HEAP_ROOT_SYSTEM_CLASS, HEAP_ROOT_THREAD, HEAP_ROOT_UNFINALIZED_OBJ, HEAP_ROOT_UNKNOWN, REACHABILITY_PHANTOM, REACHABILITY_SOFT, REACHABILITY_STRONG, REACHABILITY_UNKNOWN, REACHABILITY_WEAK, REFERENCE_ARRAY_ELEMENT, REFERENCE_ASSOCIATED_CLASS, REFERENCE_CLASS, REFERENCE_CLASS_LOADER, REFERENCE_CLASS_OBJECT, REFERENCE_CONSTANT_POOL, REFERENCE_FIELD, REFERENCE_INTERFACE, REFERENCE_LOADED_CLASS, REFERENCE_PROTECTION_DOMAIN, REFERENCE_SIGNERS, REFERENCE_STATIC_FIELD, REFERENCE_SUPERCLASS, REFERENCE_UNKNOWN, REFERENCE_UNUSED_14Modifier and TypeFieldDescriptionstatic final intClassloader heap rootstatic final intFinalizable object heap rootstatic final intJNI global reference heap rootstatic final intJNI local reference heap rootstatic final intMonitor heap rootstatic final intOther heap root typestatic final intStack local heap rootstatic final intStringtable heap rootstatic final intSystem class heap rootstatic final intThread heap rootstatic final intUnfinalized object heap rootstatic final intUnknown heap root typestatic final intReachability of target object via this reference is Phantomstatic final intReachability of target object via this reference is Softstatic final intReachability of target object via this reference is Strongstatic final intReachability of target object via this reference is unknownstatic final intReachability of target object via this reference is Weakstatic final intReference from an array to one of its elementsstatic final intReference from a JavaObject representing a Class to the associated JavaClassstatic final intReference from an object to its classstatic final intReference from a class to its class loaderstatic final intReference from a class to its java.lang.Class instancestatic final intReference from a class to a resolved entry in the constant poolstatic final intReference from an object to the value of one of its instance fieldsstatic final intReference from a class to one of its interfacesstatic final intReference from a classloader object to its loaded classesstatic final intReference from a class to its protection domainstatic final intReference from a class to its signers arraystatic final intReference from a class to the value of one of its static fieldsstatic final intReference from a class to its superclassstatic final intUnknown reference typestatic final int -
Constructor Summary
ConstructorsConstructorDescriptionDTFJJavaReference(Object source, Object target, String description, int referencetype, int roottype, int reachability) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet a string describing the reference type.intGet the reachability of the target object via this specific reference.intGet the reference type, as defined in the JVMTI specification.intGet the root type, as defined in the JVMTI specification.Get the source of this reference if available.Get the object referred to by this reference.booleanDoes this reference point to a class?booleanDoes this reference point to an object in the heap?
-
Constructor Details
-
DTFJJavaReference
public DTFJJavaReference(Object source, Object target, String description, int referencetype, int roottype, int reachability) Constructor- Parameters:
source- Object The source of this reference/root, for example the JVM or an object on the heaptarget- Object The target object of this reference/root.description- Stringreferencetype- int Mutually exclusive with respect to roottype.roottype- int Mutually exclusive with respect to referencetype.reachability- int The strength of the reference (this helps the GC in selection of objects for collection).javaVM- JavaRuntime
-
-
Method Details
-
getDescription
Description copied from interface:JavaReferenceGet a string describing the reference type. Implementers should not depend on the contents or identity of this string. e.g.JNI Weak global reference
,Instance field 'MyClass.value'
,Constant pool string constant
- Specified by:
getDescriptionin interfaceJavaReference- Returns:
- a String describing the reference type
-
getReachability
Description copied from interface:JavaReferenceGet the reachability of the target object via this specific reference.- Specified by:
getReachabilityin interfaceJavaReference- Returns:
- an integer representing the reachability, see the REACHABILITY_ static fields.
- Throws:
CorruptDataException
-
getReferenceType
Description copied from interface:JavaReferenceGet the reference type, as defined in the JVMTI specification.- Specified by:
getReferenceTypein interfaceJavaReference- Returns:
- an integer representing the reference type, see the REFERENCE_ static fields.
- Throws:
CorruptDataException
-
getRootType
Description copied from interface:JavaReferenceGet the root type, as defined in the JVMTI specification.- Specified by:
getRootTypein interfaceJavaReference- Returns:
- an integer representing the root type, see the HEAP_ROOT_ static fields.
- Throws:
CorruptDataException
-
getSource
Description copied from interface:JavaReferenceGet the source of this reference if available.- Specified by:
getSourcein interfaceJavaReference- Returns:
- a JavaClass, JavaObject, JavaStackFrame or null if unknown
- Throws:
DataUnavailableCorruptDataException
-
getTarget
Description copied from interface:JavaReferenceGet the object referred to by this reference.- Specified by:
getTargetin interfaceJavaReference- Returns:
- a JavaObject or a JavaClass
- Throws:
DataUnavailableCorruptDataException
-
isClassReference
Description copied from interface:JavaReferenceDoes this reference point to a class?- Specified by:
isClassReferencein interfaceJavaReference- Returns:
- true if the target of this root is a class
- Throws:
DataUnavailableCorruptDataException
-
isObjectReference
Description copied from interface:JavaReferenceDoes this reference point to an object in the heap?- Specified by:
isObjectReferencein interfaceJavaReference- Returns:
- true if the target of this root is an object
- Throws:
DataUnavailableCorruptDataException
-