com.ibm.dtfj.java

Interface JavaReference


  1. public interface JavaReference
Represents a Java reference.

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
HEAP_ROOT_CLASSLOADER
Classloader heap root
  1. static
  2. int
HEAP_ROOT_FINALIZABLE_OBJ
Finalizable object heap root
  1. static
  2. int
HEAP_ROOT_JNI_GLOBAL
JNI global reference heap root
  1. static
  2. int
HEAP_ROOT_JNI_LOCAL
JNI local reference heap root
  1. static
  2. int
HEAP_ROOT_MONITOR
Monitor heap root
  1. static
  2. int
HEAP_ROOT_OTHER
Other heap root type
  1. static
  2. int
HEAP_ROOT_STACK_LOCAL
Stack local heap root
  1. static
  2. int
HEAP_ROOT_STRINGTABLE
Stringtable heap root
  1. static
  2. int
HEAP_ROOT_SYSTEM_CLASS
System class heap root
  1. static
  2. int
HEAP_ROOT_THREAD
Thread heap root
  1. static
  2. int
HEAP_ROOT_UNFINALIZED_OBJ
Unfinalized object heap root
  1. static
  2. int
HEAP_ROOT_UNKNOWN
Unknown heap root type
  1. static
  2. int
REACHABILITY_PHANTOM
Reachability of target object via this reference is Phantom
  1. static
  2. int
REACHABILITY_SOFT
Reachability of target object via this reference is Soft
  1. static
  2. int
REACHABILITY_STRONG
Reachability of target object via this reference is Strong
  1. static
  2. int
REACHABILITY_UNKNOWN
Reachability of target object via this reference is unknown
  1. static
  2. int
REACHABILITY_WEAK
Reachability of target object via this reference is Weak
  1. static
  2. int
REFERENCE_ARRAY_ELEMENT
Reference from an array to one of its elements
  1. static
  2. int
REFERENCE_ASSOCIATED_CLASS
Reference from a JavaObject representing a Class to the associated JavaClass
  1. static
  2. int
REFERENCE_CLASS
Reference from an object to its class
  1. static
  2. int
REFERENCE_CLASS_LOADER
Reference from a class to its class loader
  1. static
  2. int
REFERENCE_CLASS_OBJECT
Reference from a class to its java.lang.Class instance
  1. static
  2. int
REFERENCE_CONSTANT_POOL
Reference from a class to a resolved entry in the constant pool
  1. static
  2. int
REFERENCE_FIELD
Reference from an object to the value of one of its instance fields
  1. static
  2. int
REFERENCE_INTERFACE
Reference from a class to one of its interfaces
  1. static
  2. int
REFERENCE_LOADED_CLASS
Reference from a classloader object to its loaded classes
  1. static
  2. int
REFERENCE_PROTECTION_DOMAIN
Reference from a class to its protection domain
  1. static
  2. int
REFERENCE_SIGNERS
Reference from a class to its signers array
  1. static
  2. int
REFERENCE_STATIC_FIELD
Reference from a class to the value of one of its static fields
  1. static
  2. int
REFERENCE_SUPERCLASS
Reference from a class to its superclass
  1. static
  2. int
REFERENCE_UNKNOWN
Unknown reference type

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
getDescription()
Get a string describing the reference type.
  1. int
getReachability()
Get the reachability of the target object via this specific reference.
  1. int
getReferenceType()
Get the reference type, as defined in the JVMTI specification.
  1. int
getRootType()
Get the root type, as defined in the JVMTI specification.
  1. java.lang.Object
getSource()
Get the source of this reference if available.
  1. java.lang.Object
getTarget()
Get the object referred to by this reference.
  1. boolean
isClassReference()
Does this reference point to a class?
  1. boolean
isObjectReference()
Does this reference point to an object in the heap?

Field Detail

HEAP_ROOT_UNKNOWN

  1. static final int HEAP_ROOT_UNKNOWN
Unknown heap root type
See Also:

HEAP_ROOT_JNI_GLOBAL

  1. static final int HEAP_ROOT_JNI_GLOBAL
JNI global reference heap root
See Also:

HEAP_ROOT_SYSTEM_CLASS

  1. static final int HEAP_ROOT_SYSTEM_CLASS
System class heap root
See Also:

HEAP_ROOT_MONITOR

  1. static final int HEAP_ROOT_MONITOR
Monitor heap root
See Also:

HEAP_ROOT_STACK_LOCAL

  1. static final int HEAP_ROOT_STACK_LOCAL
Stack local heap root
See Also:

HEAP_ROOT_JNI_LOCAL

  1. static final int HEAP_ROOT_JNI_LOCAL
JNI local reference heap root
See Also:

HEAP_ROOT_THREAD

  1. static final int HEAP_ROOT_THREAD
Thread heap root
See Also:

HEAP_ROOT_OTHER

  1. static final int HEAP_ROOT_OTHER
Other heap root type
See Also:

HEAP_ROOT_FINALIZABLE_OBJ

  1. static final int HEAP_ROOT_FINALIZABLE_OBJ
Finalizable object heap root
See Also:

HEAP_ROOT_UNFINALIZED_OBJ

  1. static final int HEAP_ROOT_UNFINALIZED_OBJ
Unfinalized object heap root
See Also:

HEAP_ROOT_CLASSLOADER

  1. static final int HEAP_ROOT_CLASSLOADER
Classloader heap root
See Also:

HEAP_ROOT_STRINGTABLE

  1. static final int HEAP_ROOT_STRINGTABLE
Stringtable heap root
See Also:

REFERENCE_UNKNOWN

  1. static final int REFERENCE_UNKNOWN
Unknown reference type
See Also:

REFERENCE_CLASS

  1. static final int REFERENCE_CLASS
Reference from an object to its class
See Also:

REFERENCE_FIELD

  1. static final int REFERENCE_FIELD
Reference from an object to the value of one of its instance fields
See Also:

REFERENCE_ARRAY_ELEMENT

  1. static final int REFERENCE_ARRAY_ELEMENT
Reference from an array to one of its elements
See Also:

REFERENCE_CLASS_LOADER

  1. static final int REFERENCE_CLASS_LOADER
Reference from a class to its class loader
See Also:

REFERENCE_SIGNERS

  1. static final int REFERENCE_SIGNERS
Reference from a class to its signers array
See Also:

REFERENCE_PROTECTION_DOMAIN

  1. static final int REFERENCE_PROTECTION_DOMAIN
Reference from a class to its protection domain
See Also:

REFERENCE_INTERFACE

  1. static final int REFERENCE_INTERFACE
Reference from a class to one of its interfaces
See Also:

REFERENCE_STATIC_FIELD

  1. static final int REFERENCE_STATIC_FIELD
Reference from a class to the value of one of its static fields
See Also:

REFERENCE_CONSTANT_POOL

  1. static final int REFERENCE_CONSTANT_POOL
Reference from a class to a resolved entry in the constant pool
See Also:

REFERENCE_SUPERCLASS

  1. static final int REFERENCE_SUPERCLASS
Reference from a class to its superclass
See Also:

REFERENCE_LOADED_CLASS

  1. static final int REFERENCE_LOADED_CLASS
Reference from a classloader object to its loaded classes
See Also:

REFERENCE_CLASS_OBJECT

  1. static final int REFERENCE_CLASS_OBJECT
Reference from a class to its java.lang.Class instance
See Also:

REFERENCE_ASSOCIATED_CLASS

  1. static final int REFERENCE_ASSOCIATED_CLASS
Reference from a JavaObject representing a Class to the associated JavaClass
See Also:

REACHABILITY_UNKNOWN

  1. static final int REACHABILITY_UNKNOWN
Reachability of target object via this reference is unknown
See Also:

REACHABILITY_STRONG

  1. static final int REACHABILITY_STRONG
Reachability of target object via this reference is Strong
See Also:

REACHABILITY_SOFT

  1. static final int REACHABILITY_SOFT
Reachability of target object via this reference is Soft
See Also:

REACHABILITY_WEAK

  1. static final int REACHABILITY_WEAK
Reachability of target object via this reference is Weak
See Also:

REACHABILITY_PHANTOM

  1. static final int REACHABILITY_PHANTOM
Reachability of target object via this reference is Phantom
See Also:

Method Detail

getRootType

  1. int getRootType()
  2. throws CorruptDataException
Get the root type, as defined in the JVMTI specification.
Returns:
an integer representing the root type, see HEAP_ROOT_xxxx statics.
Throws:

getReferenceType

  1. int getReferenceType()
  2. throws CorruptDataException
Get the reference type, as defined in the JVMTI specification.
Returns:
an integer representing the reference type, see REFERENCE_xxxx statics.
Throws:

getReachability

  1. int getReachability()
  2. throws CorruptDataException
Get the reachability of the target object via this specific reference.
Returns:
an integer representing the reachability, see REACHABILITY_xxxx statics.
Throws:

getDescription

  1. java.lang.String getDescription( )
Get a string describing the reference type. Implementors 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"
Returns:
a String describing the reference type

isObjectReference

  1. boolean isObjectReference()
  2. throws DataUnavailable
  3. CorruptDataException
Does this reference point to an object in the heap?
Returns:
true if the target of this root is an object
Throws:

isClassReference

  1. boolean isClassReference()
  2. throws DataUnavailable
  3. CorruptDataException
Does this reference point to a class?
Returns:
true if the target of this root is a class
Throws:

getTarget

  1. java.lang.Object getTarget()
  2. throws DataUnavailable
  3. CorruptDataException
Get the object referred to by this reference.
Returns:
a JavaObject or a JavaClass
Throws:

getSource

  1. java.lang.Object getSource()
  2. throws DataUnavailable
  3. CorruptDataException
Get the source of this reference if available.
Returns:
a JavaClass, JavaObject, JavaStackFrame or null if unknown
Throws: