Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.jdi.internal
Class ReferenceTypeImpl  view ReferenceTypeImpl download ReferenceTypeImpl.java

java.lang.Object
  extended byorg.eclipse.jdi.internal.MirrorImpl
      extended byorg.eclipse.jdi.internal.AccessibleImpl
          extended byorg.eclipse.jdi.internal.TypeImpl
              extended byorg.eclipse.jdi.internal.ReferenceTypeImpl
All Implemented Interfaces:
com.sun.jdi.Accessible, java.lang.Comparable, com.sun.jdi.Mirror, org.eclipse.jdi.hcr.ReferenceType, com.sun.jdi.ReferenceType, com.sun.jdi.Type
Direct Known Subclasses:
ArrayTypeImpl, ClassTypeImpl, InterfaceTypeImpl

public abstract class ReferenceTypeImpl
extends TypeImpl
implements com.sun.jdi.ReferenceType, org.eclipse.jdi.hcr.ReferenceType

this class implements the corresponding interfaces declared by the JDI specification. See the com.sun.jdi package for more information.


Nested Class Summary
protected static class ReferenceTypeImpl.FileInfo
          Represent the datat about one file info contained in one stratum in the Smap.
protected static class ReferenceTypeImpl.Stratum
          Represent the information contains in the Smap about one stratum.
 
Field Summary
private  java.util.List fAllFields
           
private  java.util.List fAllInterfaces
           
private  java.util.List fAllMethods
           
private  int fClassFileVersion
           
private  ClassLoaderReferenceImpl fClassLoader
           
private  ClassObjectReferenceImpl fClassObject
           
private  java.lang.String fDefaultStratumId
          The default stratum id.
private  java.util.List fFields
           
private static java.lang.String[] fgClassStatusStrings
          Mapping of command codes to strings.
private  java.lang.String fGenericSignature
           
private  boolean fGenericSignatureKnown
           
private  boolean fGotClassFileVersion
           
protected  java.util.List fInterfaces
          The following are the stored results of JDWP calls.
private  boolean fIsHCREligible
           
private  boolean fIsVersionKnown
           
private  java.util.List fMethods
           
private  java.util.Hashtable fMethodTable
           
private  int fModifierBits
           
private  org.eclipse.jdi.internal.jdwp.JdwpReferenceTypeID fReferenceTypeID
          ReferenceTypeID that corresponds to this reference.
private  java.lang.String fSmap
          The source map string returned by the VM.
private  boolean fSourceDebugExtensionAvailable
           
private  java.lang.String fSourceName
           
private  java.util.Map fStrata
          A map of the defined strata.
private  java.util.Map fStratumAllLineLocations
           
private  java.util.List fVisibleFields
           
private  java.util.List fVisibleMethods
           
static int JDWP_CLASS_STATUS_ERROR
           
static int JDWP_CLASS_STATUS_INITIALIZED
           
static int JDWP_CLASS_STATUS_PREPARED
           
static int JDWP_CLASS_STATUS_VERIFIED
          ClassStatus Constants.
 
Fields inherited from class org.eclipse.jdi.internal.TypeImpl
fName, fSignature
 
Fields inherited from class org.eclipse.jdi.internal.AccessibleImpl
MODIFIER_ACC_ABSTRACT, MODIFIER_ACC_BRIDGE, MODIFIER_ACC_ENUM, MODIFIER_ACC_FINAL, MODIFIER_ACC_NATIVE, MODIFIER_ACC_PRIVATE, MODIFIER_ACC_PROTECTED, MODIFIER_ACC_PUBLIC, MODIFIER_ACC_STATIC, MODIFIER_ACC_STRICT, MODIFIER_ACC_SUPER, MODIFIER_ACC_SYNCHRONIZED, MODIFIER_ACC_SYNTHETIC, MODIFIER_ACC_TRANSIENT, MODIFIER_ACC_VARARGS, MODIFIER_ACC_VOLITILE, MODIFIER_SYNTHETIC
 
Fields inherited from class org.eclipse.jdi.internal.MirrorImpl
fDescription, fVerboseWriter
 
Constructor Summary
protected ReferenceTypeImpl(java.lang.String description, VirtualMachineImpl vmImpl, org.eclipse.jdi.internal.jdwp.JdwpReferenceTypeID referenceTypeID)
          Creates new instance.
protected ReferenceTypeImpl(java.lang.String description, VirtualMachineImpl vmImpl, org.eclipse.jdi.internal.jdwp.JdwpReferenceTypeID referenceTypeID, java.lang.String signature, java.lang.String genericSignature)
          Creates new instance.
 
Method Summary
protected  void addStratum(ReferenceTypeImpl.Stratum stratum)
          Add a new stratum to this type.
private  void addVisibleFields(java.util.List newFields, java.util.Set names, java.util.List resultFields)
          Add fields to a set of fields if they are not overriden, add new fieldnames to set of fieldnames.
private  void addVisibleMethods(java.util.List inheritedMethods, java.util.Set nameAndSignatures, java.util.List resultMethods)
          Add methods to a set of methods if they are not overriden, add new names+signature combinations to set of names+signature combinations.
 java.util.List allFields()
           
 java.util.List allInterfaces()
           
 java.util.List allLineLocations()
           
 java.util.List allLineLocations(java.lang.String stratum, java.lang.String sourceName)
           
 java.util.List allLineLocations(java.lang.String stratumId, java.lang.String sourceName, MethodImpl method, long[] codeIndexTable, int[] javaStratumLineNumberTable)
          Return the locations of all lines in the given source file of the given stratum which are included in the given method.
 java.util.List allMethods()
           
 java.util.List availableStrata()
           
 com.sun.jdi.ClassLoaderReference classLoader()
           
 com.sun.jdi.ClassObjectReference classObject()
           
static java.lang.String[] classStatusStrings()
           
 int compareTo(java.lang.Object object)
          Compares this object with another, and returns a numerical result based on the comparison.
static TypeImpl create(VirtualMachineImpl vmImpl, java.lang.String signature, com.sun.jdi.ClassLoaderReference classLoader)
           
 com.sun.jdi.Value createNullValue()
           
 java.lang.String defaultStratum()
           
 boolean equals(java.lang.Object object)
          Determine whether this Object is semantically equal to another Object.
 boolean failedToInitialize()
           
 com.sun.jdi.Field fieldByName(java.lang.String name)
           
 java.util.List fields()
           
private  ReferenceTypeImpl.FileInfo fileInfo(long codeIndex, MethodImpl method, ReferenceTypeImpl.Stratum stratum)
          Return the FileInfo object of the input source file of which the given code index is part of the translation, for this stratum.
 FieldImpl findField(org.eclipse.jdi.internal.jdwp.JdwpFieldID fieldID)
           
 MethodImpl findMethod(org.eclipse.jdi.internal.jdwp.JdwpMethodID methodID)
           
 void flushStoredJdwpResults()
          Flushes all stored Jdwp results.
 java.lang.String genericSignature()
           
 int getClassFileVersion()
          An HCR-eligible class file may now be loaded and reloaded at some later point(s).
static void getConstantMaps()
          Retrieves constant mappings.
private  java.lang.String getPath(java.lang.String sourceName)
          Generate a source path from the given source name.
 org.eclipse.jdi.internal.jdwp.JdwpReferenceTypeID getRefTypeID()
           
private  void getSourceDebugExtension()
          Get the source debug extension from the VM.
private  void getSourceName()
          Get the name of the Java source file from the VM.
private  ReferenceTypeImpl.Stratum getStratum(java.lang.String stratumId)
          Return the stratum object for this stratum Id.
 com.sun.jdi.Value getValue(com.sun.jdi.Field field)
           
 java.util.Map getValues(java.util.List fields)
           
 int hashCode()
          Get a value that represents this Object, as uniquely as possible within the confines of an int.
 java.util.List interfaces()
           
 boolean isAbstract()
           
 boolean isFinal()
           
 boolean isHCREligible()
          Returns whether this reference type is eligible for hot code replacement.
 boolean isInitialized()
           
 boolean isPrepared()
           
private  boolean isSourceDebugExtensionAvailable()
          Check in the source debug extension is available.
 boolean isStatic()
           
 boolean isVerified()
           
 boolean isVersionKnown()
          Returns whether this reference type knows its class file version.
private  java.util.List lineInfos(long codeIndex, MethodImpl method, ReferenceTypeImpl.Stratum stratum)
          Return the list of line number in the input files of the stratum associated with the code at the given address.
protected  int lineNumber(long codeIndex, MethodImpl method, java.lang.String stratumId)
          Return the number of the line of which the given code index is part of the translation, for this stratum.
 java.util.List locationsOfLine(int line)
           
 java.util.List locationsOfLine(java.lang.String stratum, java.lang.String sourceName, int lineNumber)
           
 java.util.List locationsOfLine(java.lang.String stratumId, java.lang.String sourceName, int lineNumber, MethodImpl method)
          Return the location which are part of the translation of the given line, in the given stratum in the source file with the given source name.
 java.util.List methods()
           
 java.util.List methodsByName(java.lang.String name)
           
 java.util.List methodsByName(java.lang.String name, java.lang.String signature)
           
 int modifiers()
           
 java.lang.String name()
           
 java.util.List nestedTypes()
           
static ReferenceTypeImpl readWithTypeTag(MirrorImpl target, java.io.DataInputStream in)
           
static ReferenceTypeImpl readWithTypeTagAndSignature(MirrorImpl target, boolean withGenericSignature, java.io.DataInputStream in)
           
protected  void setDefaultStratumId(java.lang.String defaultStratumId)
          Set the default stratum.
 void setGenericSignature(java.lang.String genericSignature)
          if genericSignature is null, the generic signature is set to not-known (genericSignature() will ask the VM for the generic signature) if genericSignature is an empty String, the generic signature is set to no-generic-signature (genericSignature() will return null) if genericSignature is an non-empty String, the generic signature is set to the specified value (genericSignature() will return the specified value)
protected  void setOutputFileName(java.lang.String outputFileName)
          Set the output file name, i.e.
 java.lang.String signature()
           
 java.lang.String sourceDebugExtension()
           
 java.lang.String sourceName()
           
protected  java.lang.String sourceName(long codeIndex, MethodImpl method, java.lang.String stratumId)
          Return the name of the input source file of which the given code index is part of the translation, for this stratum.
 java.util.List sourceNames(java.lang.String stratumId)
           
protected  java.lang.String sourcePath(long codeIndex, MethodImpl method, java.lang.String stratumId)
          Return the path of the input source file of which the given code index is part of the translation, for this stratum.
 java.util.List sourcePaths(java.lang.String stratumId)
           
protected  int status()
           
abstract  byte typeTag()
           
 java.util.List visibleFields()
           
 java.util.List visibleMethods()
           
 void write(MirrorImpl target, java.io.DataOutputStream out)
          Writes JDWP representation.
static void writeNull(MirrorImpl target, java.io.DataOutputStream out)
          Writes representation of null referenceType.
 void writeWithTag(MirrorImpl target, java.io.DataOutputStream out)
          Writes JDWP representation.
 
Methods inherited from class org.eclipse.jdi.internal.TypeImpl
classNameToSignature, setName, setSignature, signatureToTag, toString
 
Methods inherited from class org.eclipse.jdi.internal.AccessibleImpl
getModifierStrings, isPackagePrivate, isPrivate, isProtected, isPublic
 
Methods inherited from class org.eclipse.jdi.internal.MirrorImpl
checkVM, defaultIOExceptionHandler, defaultReplyErrorHandler, disconnectVM, getCommandVM, handledJdwpEventSet, handledJdwpRequest, initJdwpEventSet, initJdwpRequest, readBoolean, readByte, readByte, readByte, readByteArray, readChar, readDouble, readFloat, readInt, readInt, readInt, readLong, readShort, readShort, readShort, readString, requestVM, requestVM, requestVM, requestVM, requestVM, verboseWriter, virtualMachine, virtualMachineImpl, writeBoolean, writeByte, writeByte, writeByte, writeChar, writeDouble, writeFloat, writeInt, writeInt, writeInt, writeLong, writeShort, writeShort, writeShort, writeString, writeVerboseCommandPacketHeader
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.jdi.Mirror
toString, virtualMachine
 
Methods inherited from interface com.sun.jdi.Accessible
isPackagePrivate, isPrivate, isProtected, isPublic
 

Field Detail

JDWP_CLASS_STATUS_VERIFIED

public static final int JDWP_CLASS_STATUS_VERIFIED
ClassStatus Constants.

See Also:
Constant Field Values

JDWP_CLASS_STATUS_PREPARED

public static final int JDWP_CLASS_STATUS_PREPARED
See Also:
Constant Field Values

JDWP_CLASS_STATUS_INITIALIZED

public static final int JDWP_CLASS_STATUS_INITIALIZED
See Also:
Constant Field Values

JDWP_CLASS_STATUS_ERROR

public static final int JDWP_CLASS_STATUS_ERROR
See Also:
Constant Field Values

fgClassStatusStrings

private static java.lang.String[] fgClassStatusStrings
Mapping of command codes to strings.


fReferenceTypeID

private org.eclipse.jdi.internal.jdwp.JdwpReferenceTypeID fReferenceTypeID
ReferenceTypeID that corresponds to this reference.


fInterfaces

protected java.util.List fInterfaces
The following are the stored results of JDWP calls.


fMethods

private java.util.List fMethods

fMethodTable

private java.util.Hashtable fMethodTable

fFields

private java.util.List fFields

fAllMethods

private java.util.List fAllMethods

fVisibleMethods

private java.util.List fVisibleMethods

fAllFields

private java.util.List fAllFields

fVisibleFields

private java.util.List fVisibleFields

fAllInterfaces

private java.util.List fAllInterfaces

fStratumAllLineLocations

private java.util.Map fStratumAllLineLocations

fSourceName

private java.lang.String fSourceName

fModifierBits

private int fModifierBits

fClassLoader

private ClassLoaderReferenceImpl fClassLoader

fClassObject

private ClassObjectReferenceImpl fClassObject

fGenericSignature

private java.lang.String fGenericSignature

fGenericSignatureKnown

private boolean fGenericSignatureKnown

fGotClassFileVersion

private boolean fGotClassFileVersion

fClassFileVersion

private int fClassFileVersion

fIsHCREligible

private boolean fIsHCREligible

fIsVersionKnown

private boolean fIsVersionKnown

fSourceDebugExtensionAvailable

private boolean fSourceDebugExtensionAvailable

fDefaultStratumId

private java.lang.String fDefaultStratumId
The default stratum id.


fStrata

private java.util.Map fStrata
A map of the defined strata. Map stratum id -> Stratum object. (String -> Stratum).


fSmap

private java.lang.String fSmap
The source map string returned by the VM.

Constructor Detail

ReferenceTypeImpl

protected ReferenceTypeImpl(java.lang.String description,
                            VirtualMachineImpl vmImpl,
                            org.eclipse.jdi.internal.jdwp.JdwpReferenceTypeID referenceTypeID)
Creates new instance.


ReferenceTypeImpl

protected ReferenceTypeImpl(java.lang.String description,
                            VirtualMachineImpl vmImpl,
                            org.eclipse.jdi.internal.jdwp.JdwpReferenceTypeID referenceTypeID,
                            java.lang.String signature,
                            java.lang.String genericSignature)
Creates new instance.

Method Detail

typeTag

public abstract byte typeTag()

flushStoredJdwpResults

public void flushStoredJdwpResults()
Flushes all stored Jdwp results.


allInterfaces

public java.util.List allInterfaces()

getRefTypeID

public org.eclipse.jdi.internal.jdwp.JdwpReferenceTypeID getRefTypeID()

modifiers

public int modifiers()
Specified by:
modifiers in class TypeImpl

addVisibleMethods

private void addVisibleMethods(java.util.List inheritedMethods,
                               java.util.Set nameAndSignatures,
                               java.util.List resultMethods)
Add methods to a set of methods if they are not overriden, add new names+signature combinations to set of names+signature combinations.


visibleMethods

public java.util.List visibleMethods()
Specified by:
visibleMethods in interface com.sun.jdi.ReferenceType

allMethods

public java.util.List allMethods()
Specified by:
allMethods in interface com.sun.jdi.ReferenceType

interfaces

public java.util.List interfaces()

addVisibleFields

private void addVisibleFields(java.util.List newFields,
                              java.util.Set names,
                              java.util.List resultFields)
Add fields to a set of fields if they are not overriden, add new fieldnames to set of fieldnames.


visibleFields

public java.util.List visibleFields()
Specified by:
visibleFields in interface com.sun.jdi.ReferenceType

allFields

public java.util.List allFields()
Specified by:
allFields in interface com.sun.jdi.ReferenceType

classLoader

public com.sun.jdi.ClassLoaderReference classLoader()
Specified by:
classLoader in interface com.sun.jdi.ReferenceType

classObject

public com.sun.jdi.ClassObjectReference classObject()
Specified by:
classObject in interface com.sun.jdi.ReferenceType

status

protected int status()

failedToInitialize

public boolean failedToInitialize()
Specified by:
failedToInitialize in interface com.sun.jdi.ReferenceType

isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface com.sun.jdi.ReferenceType

isPrepared

public boolean isPrepared()
Specified by:
isPrepared in interface com.sun.jdi.ReferenceType

isVerified

public boolean isVerified()
Specified by:
isVerified in interface com.sun.jdi.ReferenceType

fieldByName

public com.sun.jdi.Field fieldByName(java.lang.String name)
Specified by:
fieldByName in interface com.sun.jdi.ReferenceType

fields

public java.util.List fields()
Specified by:
fields in interface com.sun.jdi.ReferenceType

findField

public FieldImpl findField(org.eclipse.jdi.internal.jdwp.JdwpFieldID fieldID)

findMethod

public MethodImpl findMethod(org.eclipse.jdi.internal.jdwp.JdwpMethodID methodID)

getValue

public com.sun.jdi.Value getValue(com.sun.jdi.Field field)
Specified by:
getValue in interface com.sun.jdi.ReferenceType

getValues

public java.util.Map getValues(java.util.List fields)
Specified by:
getValues in interface com.sun.jdi.ReferenceType

hashCode

public int hashCode()
Description copied from class: java.lang.Object
Get a value that represents this Object, as uniquely as possible within the confines of an int.

There are some requirements on this method which subclasses must follow:

  • Semantic equality implies identical hashcodes. In other words, if a.equals(b) is true, then a.hashCode() == b.hashCode() must be as well. However, the reverse is not necessarily true, and two objects may have the same hashcode without being equal.
  • It must be consistent. Whichever value o.hashCode() returns on the first invocation must be the value returned on all later invocations as long as the object exists. Notice, however, that the result of hashCode may change between separate executions of a Virtual Machine, because it is not invoked on the same object.

Notice that since hashCode is used in java.util.Hashtable and other hashing classes, a poor implementation will degrade the performance of hashing (so don't blindly implement it as returning a constant!). Also, if calculating the hash is time-consuming, a class may consider caching the results.

The default implementation returns System.identityHashCode(this)

Specified by:
hashCode in interface com.sun.jdi.ReferenceType

equals

public boolean equals(java.lang.Object object)
Description copied from class: java.lang.Object
Determine whether this Object is semantically equal to another Object.

There are some fairly strict requirements on this method which subclasses must follow:

  • It must be transitive. If a.equals(b) and b.equals(c), then a.equals(c) must be true as well.
  • It must be symmetric. a.equals(b) and b.equals(a) must have the same value.
  • It must be reflexive. a.equals(a) must always be true.
  • It must be consistent. Whichever value a.equals(b) returns on the first invocation must be the value returned on all later invocations.
  • a.equals(null) must be false.
  • It must be consistent with hashCode(). That is, a.equals(b) must imply a.hashCode() == b.hashCode(). The reverse is not true; two objects that are not equal may have the same hashcode, but that has the potential to harm hashing performance.

This is typically overridden to throw a java.lang.ClassCastException if the argument is not comparable to the class performing the comparison, but that is not a requirement. It is legal for a.equals(b) to be true even though a.getClass() != b.getClass(). Also, it is typical to never cause a java.lang.NullPointerException.

In general, the Collections API (java.util) use the equals method rather than the == operator to compare objects. However, java.util.IdentityHashMap is an exception to this rule, for its own good reasons.

The default implementation returns this == o.

Specified by:
equals in interface com.sun.jdi.ReferenceType

compareTo

public int compareTo(java.lang.Object object)
Description copied from interface: java.lang.Comparable
Compares this object with another, and returns a numerical result based on the comparison. If the result is negative, this object sorts less than the other; if 0, the two are equal, and if positive, this object sorts greater than the other. To translate this into boolean, simply perform o1.compareTo(o2) <op> 0, where op is one of <, <=, =, !=, >, or >=.

You must make sure that the comparison is mutual, ie. sgn(x.compareTo(y)) == -sgn(y.compareTo(x)) (where sgn() is defined as -1, 0, or 1 based on the sign). This includes throwing an exception in either direction if the two are not comparable; hence, compareTo(null) should always throw an Exception.

You should also ensure transitivity, in two forms: x.compareTo(y) > 0 && y.compareTo(z) > 0 implies x.compareTo(z) > 0; and x.compareTo(y) == 0 implies x.compareTo(z) == y.compareTo(z).

Specified by:
compareTo in interface java.lang.Comparable

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface com.sun.jdi.ReferenceType

isFinal

public boolean isFinal()
Specified by:
isFinal in interface com.sun.jdi.ReferenceType

isStatic

public boolean isStatic()
Specified by:
isStatic in interface com.sun.jdi.ReferenceType

locationsOfLine

public java.util.List locationsOfLine(int line)
                               throws com.sun.jdi.AbsentInformationException
Specified by:
locationsOfLine in interface com.sun.jdi.ReferenceType

methods

public java.util.List methods()
Specified by:
methods in interface com.sun.jdi.ReferenceType

methodsByName

public java.util.List methodsByName(java.lang.String name)
Specified by:
methodsByName in interface com.sun.jdi.ReferenceType

methodsByName

public java.util.List methodsByName(java.lang.String name,
                                    java.lang.String signature)
Specified by:
methodsByName in interface com.sun.jdi.ReferenceType

name

public java.lang.String name()
Specified by:
name in interface com.sun.jdi.ReferenceType
Overrides:
name in class TypeImpl

signature

public java.lang.String signature()
Specified by:
signature in interface com.sun.jdi.Type
Overrides:
signature in class TypeImpl

nestedTypes

public java.util.List nestedTypes()
Specified by:
nestedTypes in interface com.sun.jdi.ReferenceType

sourceName

public java.lang.String sourceName()
                            throws com.sun.jdi.AbsentInformationException
Specified by:
sourceName in interface com.sun.jdi.ReferenceType

getClassFileVersion

public int getClassFileVersion()
Description copied from interface: org.eclipse.jdi.hcr.ReferenceType
An HCR-eligible class file may now be loaded and reloaded at some later point(s). Methods on the stack may come from any of several versions of the same HCR-eligible class. The debugger can query any class file related object (class, method, or field) for information about the version of the class file from which it came.

Classes loaded by a cooperating class loader are flagged as HCR-eligible for hot code replacement.

Class file versions are identified by the CRC-32 of the entire class file contents.

The VM typically computes and remembers the CRC when it digests a class file. Note this behavior is optional; VM need not retain any CRCs. A debugger can query any class for its class CRC and eligibility:

  • The query can be made at at time.
  • This is not directed to any specific thread.
  • Threads may be running at the time; they are not stopped.
  • Other JDI-level operations may be in progress.
  • If a debugger knows only about a method or a field, it must first query its defining class first to find out what is the CRC for this method or field.
All information returned does not change over the lifetime of the reference type object (replacing the class results in a new reference type object). This info can therefore be cached client-side with impunity.

This simple mechanism allows the IDE to detect that an object does not belong to the current class file base (debugger computes CRC of current class file and queries VM and compares to its CRC). It also allows the debugger to quickly detect whether two objects come from the same class file (debugger queries VM and compares CRCs). By checking the HCR-eligibility bit, the debugger can determine whether the class could be hot replaced in principle.

Returns the CRC-32 of the entire class file contents for this reference type.

Specified by:
getClassFileVersion in interface org.eclipse.jdi.hcr.ReferenceType

isVersionKnown

public boolean isVersionKnown()
Description copied from interface: org.eclipse.jdi.hcr.ReferenceType
Returns whether this reference type knows its class file version. Returns false for ArrayTypes.

Specified by:
isVersionKnown in interface org.eclipse.jdi.hcr.ReferenceType

isHCREligible

public boolean isHCREligible()
Description copied from interface: org.eclipse.jdi.hcr.ReferenceType
Returns whether this reference type is eligible for hot code replacement.

Specified by:
isHCREligible in interface org.eclipse.jdi.hcr.ReferenceType

write

public void write(MirrorImpl target,
                  java.io.DataOutputStream out)
           throws java.io.IOException
Writes JDWP representation.


writeNull

public static void writeNull(MirrorImpl target,
                             java.io.DataOutputStream out)
                      throws java.io.IOException
Writes representation of null referenceType.


writeWithTag

public void writeWithTag(MirrorImpl target,
                         java.io.DataOutputStream out)
                  throws java.io.IOException
Writes JDWP representation.


readWithTypeTag

public static ReferenceTypeImpl readWithTypeTag(MirrorImpl target,
                                                java.io.DataInputStream in)
                                         throws java.io.IOException

allLineLocations

public java.util.List allLineLocations()
                                throws com.sun.jdi.AbsentInformationException
Specified by:
allLineLocations in interface com.sun.jdi.ReferenceType

readWithTypeTagAndSignature

public static ReferenceTypeImpl readWithTypeTagAndSignature(MirrorImpl target,
                                                            boolean withGenericSignature,
                                                            java.io.DataInputStream in)
                                                     throws java.io.IOException

create

public static TypeImpl create(VirtualMachineImpl vmImpl,
                              java.lang.String signature,
                              com.sun.jdi.ClassLoaderReference classLoader)
                       throws com.sun.jdi.ClassNotLoadedException

getConstantMaps

public static void getConstantMaps()
Retrieves constant mappings.


classStatusStrings

public static java.lang.String[] classStatusStrings()

createNullValue

public com.sun.jdi.Value createNullValue()
Specified by:
createNullValue in class TypeImpl

sourceNames

public java.util.List sourceNames(java.lang.String stratumId)
                           throws com.sun.jdi.AbsentInformationException
Specified by:
sourceNames in interface com.sun.jdi.ReferenceType

sourcePaths

public java.util.List sourcePaths(java.lang.String stratumId)
                           throws com.sun.jdi.AbsentInformationException
Specified by:
sourcePaths in interface com.sun.jdi.ReferenceType

sourceDebugExtension

public java.lang.String sourceDebugExtension()
                                      throws com.sun.jdi.AbsentInformationException
Specified by:
sourceDebugExtension in interface com.sun.jdi.ReferenceType

allLineLocations

public java.util.List allLineLocations(java.lang.String stratum,
                                       java.lang.String sourceName)
                                throws com.sun.jdi.AbsentInformationException
Specified by:
allLineLocations in interface com.sun.jdi.ReferenceType

locationsOfLine

public java.util.List locationsOfLine(java.lang.String stratum,
                                      java.lang.String sourceName,
                                      int lineNumber)
                               throws com.sun.jdi.AbsentInformationException
Specified by:
locationsOfLine in interface com.sun.jdi.ReferenceType

availableStrata

public java.util.List availableStrata()
Specified by:
availableStrata in interface com.sun.jdi.ReferenceType

defaultStratum

public java.lang.String defaultStratum()
Specified by:
defaultStratum in interface com.sun.jdi.ReferenceType

getPath

private java.lang.String getPath(java.lang.String sourceName)
Generate a source path from the given source name. The returned string is the package name of this type converted to a platform dependent path followed by the given source name. For example, on a Unix platform, the type org.my.TestJsp with the source name test.jsp would return "org/my/test.jsp".


getStratum

private ReferenceTypeImpl.Stratum getStratum(java.lang.String stratumId)
Return the stratum object for this stratum Id. If the the specified stratum id is not defined for this reference type, return the stratum object for the default stratum. If the specified stratum id (or the default stratum id, if the specified stratum id is not defined) is Java, return null.


getSourceDebugExtension

private void getSourceDebugExtension()
                              throws com.sun.jdi.AbsentInformationException
Get the source debug extension from the VM.


getSourceName

private void getSourceName()
                    throws com.sun.jdi.AbsentInformationException
Get the name of the Java source file from the VM.


isSourceDebugExtensionAvailable

private boolean isSourceDebugExtensionAvailable()
Check in the source debug extension is available. To call before doing operations which need data from the Smap. Return false if the source debug extension is not available for any reason. true indicates that the source debug extension is available and the information has been parsed and stored in the maps and lists.


setOutputFileName

protected void setOutputFileName(java.lang.String outputFileName)
Set the output file name, i.e. the .java file used to generate the bytecode.


setDefaultStratumId

protected void setDefaultStratumId(java.lang.String defaultStratumId)
Set the default stratum. This stratum will be used for the method on strata related data, but with no stratum parameter.


addStratum

protected void addStratum(ReferenceTypeImpl.Stratum stratum)
Add a new stratum to this type.


sourceName

protected java.lang.String sourceName(long codeIndex,
                                      MethodImpl method,
                                      java.lang.String stratumId)
                               throws com.sun.jdi.AbsentInformationException
Return the name of the input source file of which the given code index is part of the translation, for this stratum. If the code at the given index is not a part of the translation of the given stratum code, return the name of the primary input source file.


fileInfo

private ReferenceTypeImpl.FileInfo fileInfo(long codeIndex,
                                            MethodImpl method,
                                            ReferenceTypeImpl.Stratum stratum)
Return the FileInfo object of the input source file of which the given code index is part of the translation, for this stratum. If the code at the given index is not a part of the translation of the given stratum code, return the FileInfo of the primary input source file.


lineInfos

private java.util.List lineInfos(long codeIndex,
                                 MethodImpl method,
                                 ReferenceTypeImpl.Stratum stratum)
                          throws com.sun.jdi.AbsentInformationException
Return the list of line number in the input files of the stratum associated with the code at the given address.


sourcePath

protected java.lang.String sourcePath(long codeIndex,
                                      MethodImpl method,
                                      java.lang.String stratumId)
                               throws com.sun.jdi.AbsentInformationException
Return the path of the input source file of which the given code index is part of the translation, for this stratum. If the code at the given index is not a part of the translation of the given stratum code, return the path of the primary input source file.