Interface IJavaReferenceType

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.model.IDebugElement, IJavaType
All Known Subinterfaces:
IJavaArrayType, IJavaClassType, IJavaInterfaceType

public interface IJavaReferenceType extends IJavaType
Represents the type of an object in a virtual machine - including classes, interfaces and array types.
Since:
3.0
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a collection of the names of all of the fields declared in this type, all of its super classes, implemented interfaces and super interfaces.
    Returns a collection of strata available for this type.
    Returns the class loader object that loaded the class corresponding to this type, or null if this type was loaded by the bootstrap loader.
    Returns the class object associated with this type.
    Returns a collection of the names of the fields declared in this type.
    Returns the default stratum for this type.
    Returns a variable representing the static field in this type with the given name, or null if there is no field with the given name, or the name is ambiguous.
    Returns the generic signature as defined in the JVM specification for this type.
    long
    Returns the number of instances of this type currently allocated in the target virtual machine, or -1 if instance counts are not supported by the target.
    getInstances(long max)
    Retrieves and returns instances of this reference type.
    Returns the unqualified name of the source file corresponding to this type, or null if source name debug attribute is not present.
    Returns the unqualified names of the source files corresponding to this type in the specified stratum, or null if the source name debug attribute is not present.
    Returns the qualified names of the source files corresponding to this type in the specified stratum, or null if the source name debug attribute is not present.

    Methods inherited from interface org.eclipse.core.runtime.IAdaptable

    getAdapter

    Methods inherited from interface org.eclipse.debug.core.model.IDebugElement

    getDebugTarget, getLaunch, getModelIdentifier

    Methods inherited from interface org.eclipse.jdt.debug.core.IJavaType

    getName, getSignature
  • Method Details

    • getField

      IJavaFieldVariable getField(String name) throws org.eclipse.debug.core.DebugException
      Returns a variable representing the static field in this type with the given name, or null if there is no field with the given name, or the name is ambiguous.
      Parameters:
      name - field name
      Returns:
      the variable representing the static field, or null
      Throws:
      org.eclipse.debug.core.DebugException - if this method fails. Reasons include:
      • Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
    • getClassObject

      IJavaClassObject getClassObject() throws org.eclipse.debug.core.DebugException
      Returns the class object associated with this type.
      Returns:
      the class object associated with this type
      Throws:
      org.eclipse.debug.core.DebugException - if this method fails. Reasons include:
      • Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
    • getAvailableStrata

      String[] getAvailableStrata() throws org.eclipse.debug.core.DebugException
      Returns a collection of strata available for this type.
      Returns:
      a collection of strata available for this type
      Throws:
      org.eclipse.debug.core.DebugException - if unable to retrieve available strata
    • getDefaultStratum

      String getDefaultStratum() throws org.eclipse.debug.core.DebugException
      Returns the default stratum for this type.
      Returns:
      the default stratum for this type
      Throws:
      org.eclipse.debug.core.DebugException - if unable to retrieve the default stratum
    • getDeclaredFieldNames

      String[] getDeclaredFieldNames() throws org.eclipse.debug.core.DebugException
      Returns a collection of the names of the fields declared in this type.
      Returns:
      a collection of the names of the field declared in this type
      Throws:
      org.eclipse.debug.core.DebugException - if unable to retrieve declared field names
    • getAllFieldNames

      String[] getAllFieldNames() throws org.eclipse.debug.core.DebugException
      Returns a collection of the names of all of the fields declared in this type, all of its super classes, implemented interfaces and super interfaces.
      Returns:
      a collection of the names of all of the fields declared in this type, all of its super classes, implemented interfaces and super interfaces
      Throws:
      org.eclipse.debug.core.DebugException - if unable to retrieve field names
    • getClassLoaderObject

      IJavaObject getClassLoaderObject() throws org.eclipse.debug.core.DebugException
      Returns the class loader object that loaded the class corresponding to this type, or null if this type was loaded by the bootstrap loader.
      Returns:
      the class loader object that loaded the class corresponding to this type or null
      Throws:
      org.eclipse.debug.core.DebugException - if unable to get the class loader
      Since:
      3.1
    • getGenericSignature

      String getGenericSignature() throws org.eclipse.debug.core.DebugException
      Returns the generic signature as defined in the JVM specification for this type. Returns null if this type is not a generic type.
      Returns:
      signature, or null if generic signature not available
      Throws:
      org.eclipse.debug.core.DebugException - if this method fails. Reasons include:
      • Failure communicating with the VM. The DebugException's status code contains the underlying exception responsible for the failure.
      Since:
      3.1
    • getSourceName

      String getSourceName() throws org.eclipse.debug.core.DebugException
      Returns the unqualified name of the source file corresponding to this type, or null if source name debug attribute is not present. The source name returned is based on this target's default stratum.
      Returns:
      unqualified source file name or null
      Throws:
      org.eclipse.debug.core.DebugException - if an exception occurs retrieving the source name
      Since:
      3.2
    • getSourceNames

      String[] getSourceNames(String stratum) throws org.eclipse.debug.core.DebugException
      Returns the unqualified names of the source files corresponding to this type in the specified stratum, or null if the source name debug attribute is not present.
      Parameters:
      stratum - stratum identifier or null to use this type's default stratum
      Returns:
      unqualified source file names or null
      Throws:
      org.eclipse.debug.core.DebugException - if an exception occurs retrieving the source name
      Since:
      3.2
    • getSourcePaths

      String[] getSourcePaths(String stratum) throws org.eclipse.debug.core.DebugException
      Returns the qualified names of the source files corresponding to this type in the specified stratum, or null if the source name debug attribute is not present.
      Parameters:
      stratum - stratum identifier or null to use this type's default stratum
      Returns:
      qualified source file names or null
      Throws:
      org.eclipse.debug.core.DebugException - if an exception occurs retrieving the source name
      Since:
      3.2
    • getInstances

      IJavaObject[] getInstances(long max) throws org.eclipse.debug.core.DebugException
      Retrieves and returns instances of this reference type.
      Parameters:
      max - the maximum number of instances to retrieve or 0 to retrieve all instances
      Returns:
      instances of this reference type
      Throws:
      org.eclipse.debug.core.DebugException - on failure
      Since:
      3.3
    • getInstanceCount

      long getInstanceCount() throws org.eclipse.debug.core.DebugException
      Returns the number of instances of this type currently allocated in the target virtual machine, or -1 if instance counts are not supported by the target.
      Returns:
      number of instances of this type, or -1 if unsupported
      Throws:
      org.eclipse.debug.core.DebugException - on failure
      Since:
      3.6