Interface IJavaReferenceType

  • All Superinterfaces:
    IAdaptable, 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 Detail

      • getField

        IJavaFieldVariable getField​(String name)
                             throws 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:
        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 DebugException
        Returns the class object associated with this type.
        Returns:
        the class object associated with this type
        Throws:
        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 DebugException
        Returns a collection of strata available for this type.
        Returns:
        a collection of strata available for this type
        Throws:
        DebugException - if unable to retrieve available strata
      • getDefaultStratum

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

        String[] getDeclaredFieldNames()
                                throws 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:
        DebugException - if unable to retrieve declared field names
      • getAllFieldNames

        String[] getAllFieldNames()
                           throws 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:
        DebugException - if unable to retrieve field names
      • getClassLoaderObject

        IJavaObject getClassLoaderObject()
                                  throws 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:
        DebugException - if unable to get the class loader
        Since:
        3.1
      • getGenericSignature

        String getGenericSignature()
                            throws 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:
        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 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:
          DebugException - if an exception occurs retrieving the source name
          Since:
          3.2
        • getSourceNames

          String[] getSourceNames​(String stratum)
                           throws 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:
          DebugException - if an exception occurs retrieving the source name
          Since:
          3.2
        • getSourcePaths

          String[] getSourcePaths​(String stratum)
                           throws 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:
          DebugException - if an exception occurs retrieving the source name
          Since:
          3.2
        • getInstances

          IJavaObject[] getInstances​(long max)
                              throws 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:
          DebugException - on failure
          Since:
          3.3
        • getInstanceCount

          long getInstanceCount()
                         throws 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:
          DebugException - on failure
          Since:
          3.6