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 com.ibm.dtfj.java.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_14 -
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
-