APIdia Launch Partner
Top Fields Constructors Methods
com.sun.tools.jdi

public abstract Class ReferenceTypeImpl

extends TypeImpl
implements ReferenceType
Class Inheritance
All Implemented Interfaces
com.sun.jdi.ReferenceType, com.sun.jdi.Accessible, java.lang.Comparable, com.sun.jdi.Type, com.sun.jdi.Mirror
Known Direct Subclasses
com.sun.tools.jdi.ArrayTypeImpl, com.sun.tools.jdi.InvokableTypeImpl
Imports
java.lang.ref.SoftReference, java.util.ArrayList, .Arrays, .Collections, .HashMap, .HashSet, .Iterator, .List, .Map, .Set, com.sun.jdi.AbsentInformationException, .ClassLoaderReference, .ClassNotLoadedException, .ClassObjectReference, .Field, .InterfaceType, .InternalException, .Location, .Method, .ModuleReference, .ObjectReference, .ReferenceType, .Type, .Value, .VirtualMachine

Field Summary

Modifier and TypeField and Description
private static final String
private String
private String
private String
private ClassLoaderReference
private ClassObjectReference
private int
private SoftReference<byte[]>
private boolean
private SoftReference<List<Field>>
private String
private boolean
private static final int
private boolean
private boolean
private int
private SoftReference<List<Method>>
private int
protected int
private ModuleReference
pack-priv static final SDE
protected long
private SoftReference<SDE>
private String
private int
private boolean

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addAllFields(List<Field> fieldList, Set<ReferenceType> typeSet)

pack-priv void
addToMethodMap(Map<String, Method> methodMap, List<Method> methodList)

pack-priv void
addVisibleFields(List<Field> visibleList, Map<String, Field> visibleTable, List<String> ambiguousNames)

pack-priv abstract void
addVisibleMethods(Map<String, Method> methodMap, Set<InterfaceType> seenInterfaces)

public List<Field>
allFields()

Implements com.sun.jdi.ReferenceType.allFields.

Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.

public List<Location>
allLineLocations()

Implements com.sun.jdi.ReferenceType.allLineLocations.

Returns a list containing a Location object for each executable source line in this reference type.

public List<Location>
allLineLocations(String stratumID, String sourceName)

Implements com.sun.jdi.ReferenceType.allLineLocations.

Returns a list containing a Location object for each executable source line in this reference type.

public abstract List<Method>
allMethods()

Redeclares com.sun.jdi.ReferenceType.allMethods.

Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces.

public List<String>
availableStrata()

Implements com.sun.jdi.ReferenceType.availableStrata.

Return the available strata for this reference type.

pack-priv String
pack-priv String
pack-priv String
public ClassLoaderReference
classLoader()

Implements com.sun.jdi.ReferenceType.classLoader.

Gets the classloader object which loaded the class corresponding to this type.

public ClassObjectReference
classObject()

Implements com.sun.jdi.ReferenceType.classObject.

Returns the class object that corresponds to this type in the target VM.

public int
compareTo(ReferenceType object)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public byte[]
constantPool()

Implements com.sun.jdi.ReferenceType.constantPool.

Returns the raw bytes of the constant pool in the format of the constant_pool item of the Class File Format in the Java Virtual Machine Specification.

public int
constantPoolCount()

Implements com.sun.jdi.ReferenceType.constantPoolCount.

Returns the number of entries in the constant pool plus one.

pack-priv void
decodeStatus(int status)

public String
defaultStratum()

Implements com.sun.jdi.ReferenceType.defaultStratum.

Always returns non-null stratumID

public boolean
equals(Object obj)

Overrides com.sun.tools.jdi.TypeImpl.equals.

Implements com.sun.jdi.ReferenceType.equals.

Compares the specified Object with this ReferenceType for equality.

public boolean
failedToInitialize()

Implements com.sun.jdi.ReferenceType.failedToInitialize.

Determines if initialization failed for this class.

public Field
fieldByName(String fieldName)

Implements com.sun.jdi.ReferenceType.fieldByName.

Finds the visible Field with the given non-ambiguous name.

public List<Field>
fields()

Implements com.sun.jdi.ReferenceType.fields.

Returns a list containing each Field declared in this type.

pack-priv Type
findType(String signature)

public String
genericSignature()

Implements com.sun.jdi.ReferenceType.genericSignature.

Gets the generic signature for this type if there is one.

private void
private byte[]
pack-priv Field
getFieldMirror(long ref)

pack-priv List<InterfaceType>
pack-priv Method
getMethodMirror(long ref)

pack-priv void
public Value
getValue(Field sig)

Implements com.sun.jdi.ReferenceType.getValue.

Gets the Value of a given static Field in this type.

public Map<Field, Value>
getValues(List<? extends Field> theFields)

Implements com.sun.jdi.ReferenceType.getValues.

Returns a map of field values

public int
hashCode()

Overrides com.sun.tools.jdi.TypeImpl.hashCode.

Implements com.sun.jdi.ReferenceType.hashCode.

Returns the hash code value for this ObjectReference.

pack-priv int
indexOf(Method method)

pack-priv int
indexOf(Field field)

pack-priv abstract List<? extends ReferenceType>
public List<ObjectReference>
instances(long maxInstances)

Implements com.sun.jdi.ReferenceType.instances.

Returns instances of this ReferenceType.

public boolean
isAbstract()

Implements com.sun.jdi.ReferenceType.isAbstract.

Determines if this type was declared abstract.

pack-priv boolean
pack-priv boolean
pack-priv abstract boolean
public boolean
isFinal()

Implements com.sun.jdi.ReferenceType.isFinal.

Determines if this type was declared final.

public boolean
isInitialized()

Implements com.sun.jdi.ReferenceType.isInitialized.

Determines if this type has been initialized.

private static boolean
public boolean
isPackagePrivate()

Implements com.sun.jdi.Accessible.isPackagePrivate.

Determines if this object mirrors a package private item.

public boolean
isPrepared()

Implements com.sun.jdi.ReferenceType.isPrepared.

Determines if this type has been prepared.

public boolean
isPrivate()

Implements com.sun.jdi.Accessible.isPrivate.

Determines if this object mirrors a private item.

public boolean
isProtected()

Implements com.sun.jdi.Accessible.isProtected.

Determines if this object mirrors a protected item.

public boolean
isPublic()

Implements com.sun.jdi.Accessible.isPublic.

Determines if this object mirrors a public item.

public boolean
isStatic()

Implements com.sun.jdi.ReferenceType.isStatic.

Determines if this type was declared static.

public boolean
isVerified()

Implements com.sun.jdi.ReferenceType.isVerified.

Determines if this type has been verified.

pack-priv String
public List<Location>
locationsOfLine(int lineNumber)

Implements com.sun.jdi.ReferenceType.locationsOfLine.

Returns a List containing all Location objects that map to the given line number.

public List<Location>
locationsOfLine(String stratumID, String sourceName, int lineNumber)

Implements com.sun.jdi.ReferenceType.locationsOfLine.

Returns a List containing all Location objects that map to the given line number.

public int
majorVersion()

Implements com.sun.jdi.ReferenceType.majorVersion.

Returns the class major version number, as defined in the class file format of the Java Virtual Machine Specification.

pack-priv void
public List<Method>
methods()

Implements com.sun.jdi.ReferenceType.methods.

Returns a list containing each Method declared directly in this type.

private List<Method>
public List<Method>
methodsByName(String name)

Implements com.sun.jdi.ReferenceType.methodsByName.

Returns a List containing each visible Method that has the given name.

public List<Method>
methodsByName(String name, String signature)

Implements com.sun.jdi.ReferenceType.methodsByName.

Returns a List containing each visible Method that has the given name and signature.

public int
minorVersion()

Implements com.sun.jdi.ReferenceType.minorVersion.

Returns the class minor version number, as defined in the class file format of the Java Virtual Machine Specification.

public int
modifiers()

Implements com.sun.jdi.Accessible.modifiers.

Returns the Java programming language modifiers, encoded in an integer.

public ModuleReference
module()

Overrides default com.sun.jdi.ReferenceType.module.

Gets the module object which contains the class corresponding to this type.

public List<ReferenceType>
nestedTypes()

Implements com.sun.jdi.ReferenceType.nestedTypes.

Returns a List containing ReferenceType objects that are declared within this type and are currently loaded into the Virtual Machine.

pack-priv void
pack-priv long
ref()

pack-priv void
pack-priv void
setSignature(String signature)

pack-priv void
setStatus(int status)

public String
signature()

Implements abstract com.sun.tools.jdi.TypeImpl.signature.

Implements com.sun.jdi.Type.signature.

Returns the type signature for this type.

public String
sourceDebugExtension()

Implements com.sun.jdi.ReferenceType.sourceDebugExtension.

Get the source debug extension of this type.

private SDE
public String
sourceName()

Implements com.sun.jdi.ReferenceType.sourceName.

Gets an identifying name for the source corresponding to the declaration of this type.

public List<String>
sourceNames(String stratumID)

Implements com.sun.jdi.ReferenceType.sourceNames.

Gets the identifying names for all the source corresponding to the declaration of this type.

public List<String>
sourcePaths(String stratumID)

Implements com.sun.jdi.ReferenceType.sourcePaths.

Gets the paths to the source corresponding to the declaration of this type.

pack-priv SDE.Stratum
stratum(String stratumID)

pack-priv void
pack-priv void
pack-priv void
public List<Field>
visibleFields()

Implements com.sun.jdi.ReferenceType.visibleFields.

Returns a list containing each unhidden and unambiguous Field in this type.

public List<Method>
visibleMethods()

Implements com.sun.jdi.ReferenceType.visibleMethods.

Returns a list containing each Method declared or inherited by this type.

Inherited from com.sun.tools.jdi.TypeImpl:
name

Field Detail

ABSENT_BASE_SOURCE_NAMEback to summary
private static final String ABSENT_BASE_SOURCE_NAME
baseSourceDirback to summary
private String baseSourceDir
baseSourceNameback to summary
private String baseSourceName
baseSourcePathback to summary
private String baseSourcePath
classLoaderback to summary
private ClassLoaderReference classLoader
classObjectback to summary
private ClassObjectReference classObject
constanPoolCountback to summary
private int constanPoolCount
constantPoolBytesRefback to summary
private SoftReference<byte[]> constantPoolBytesRef
constantPoolInfoGottenback to summary
private boolean constantPoolInfoGotten
fieldsRefback to summary
private SoftReference<List<Field>> fieldsRef
genericSignatureback to summary
private String genericSignature
genericSignatureGottenback to summary
private boolean genericSignatureGotten
INITIALIZED_OR_FAILEDback to summary
private static final int INITIALIZED_OR_FAILED
isClassLoaderCachedback to summary
private boolean isClassLoaderCached
isPreparedback to summary
private boolean isPrepared
majorVersionback to summary
private int majorVersion
methodsRefback to summary
private SoftReference<List<Method>> methodsRef
minorVersionback to summary
private int minorVersion
modifiersback to summary
protected int modifiers
moduleback to summary
private ModuleReference module
NO_SDE_INFO_MARKback to summary
pack-priv static final SDE NO_SDE_INFO_MARK
refback to summary
protected long ref
sdeRefback to summary
private SoftReference<SDE> sdeRef
signatureback to summary
private String signature
statusback to summary
private int status
versionNumberGottenback to summary
private boolean versionNumberGotten

Constructor Detail

ReferenceTypeImplback to summary
protected ReferenceTypeImpl(VirtualMachine aVm, long aRef)

Method Detail

addAllFieldsback to summary
pack-priv void addAllFields(List<Field> fieldList, Set<ReferenceType> typeSet)
addToMethodMapback to summary
pack-priv void addToMethodMap(Map<String, Method> methodMap, List<Method> methodList)
addVisibleFieldsback to summary
pack-priv void addVisibleFields(List<Field> visibleList, Map<String, Field> visibleTable, List<String> ambiguousNames)
addVisibleMethodsback to summary
pack-priv abstract void addVisibleMethods(Map<String, Method> methodMap, Set<InterfaceType> seenInterfaces)
allFieldsback to summary
public List<Field> allFields()

Implements com.sun.jdi.ReferenceType.allFields.

Doc from com.sun.jdi.ReferenceType.allFields.

Returns a list containing each Field declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. All declared and inherited fields are included, regardless of whether they are hidden or multiply inherited.

For arrays (ArrayType) and primitive classes, the returned list is always empty.

allLineLocationsback to summary
public List<Location> allLineLocations() throws AbsentInformationException

Implements com.sun.jdi.ReferenceType.allLineLocations.

Doc from com.sun.jdi.ReferenceType.allLineLocations.

Returns a list containing a Location object for each executable source line in this reference type.

This method is equivalent to allLineLocations(vm.getDefaultStratum(),null) - see allLineLocations(String, String) for more information.

Exceptions
AbsentInformationException:
if there is no line number information for this class and there are non-native, non-abstract executable members of this class.
allLineLocationsback to summary
public List<Location> allLineLocations(String stratumID, String sourceName) throws AbsentInformationException

Implements com.sun.jdi.ReferenceType.allLineLocations.

Doc from com.sun.jdi.ReferenceType.allLineLocations.

Returns a list containing a Location object for each executable source line in this reference type. Each location maps a source line to a range of code indices. The beginning of the range can be determined through Location#codeIndex. The returned list may contain multiple locations for a particular line number, if the compiler and/or VM has mapped that line to two or more disjoint code index ranges. Note that it is possible for the same source line to represent different code index ranges in different methods.

For arrays (ArrayType) and primitive classes, the returned list is always empty. For interfaces (InterfaceType), the returned list will be non-empty only if the interface has executable code in its class initialization.

Returned list is for the specified stratum (see Location for a description of strata).

Exceptions
AbsentInformationException:
if there is no line number information for this class and there are non-native, non-abstract executable members of this class. Or if sourceName is non-null and source name information is not present.
allMethodsback to summary
public abstract List<Method> allMethods()

Redeclares com.sun.jdi.ReferenceType.allMethods.

Doc from com.sun.jdi.ReferenceType.allMethods.

Returns a list containing each Method declared in this type, and its superclasses, implemented interfaces, and/or superinterfaces. All declared and inherited methods are included, regardless of whether they are hidden or overridden.

For arrays (ArrayType) and primitive classes, the returned list is always empty.

availableStrataback to summary
public List<String> availableStrata()

Implements com.sun.jdi.ReferenceType.availableStrata.

Doc from com.sun.jdi.ReferenceType.availableStrata.

Return the available strata for this reference type.

See the Location for a description of strata.

baseSourceDirback to summary
pack-priv String baseSourceDir()
baseSourceNameback to summary
pack-priv String baseSourceName() throws AbsentInformationException
baseSourcePathback to summary
pack-priv String baseSourcePath() throws AbsentInformationException
classLoaderback to summary
public ClassLoaderReference classLoader()

Implements com.sun.jdi.ReferenceType.classLoader.

Doc from com.sun.jdi.ReferenceType.classLoader.

Gets the classloader object which loaded the class corresponding to this type.

classObjectback to summary
public ClassObjectReference classObject()

Implements com.sun.jdi.ReferenceType.classObject.

Doc from com.sun.jdi.ReferenceType.classObject.

Returns the class object that corresponds to this type in the target VM. The VM creates class objects for every kind of ReferenceType: classes, interfaces, and array types.

compareToback to summary
public int compareTo(ReferenceType object)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

constantPoolback to summary
public byte[] constantPool()

Implements com.sun.jdi.ReferenceType.constantPool.

Doc from com.sun.jdi.ReferenceType.constantPool.

Returns the raw bytes of the constant pool in the format of the constant_pool item of the Class File Format in the Java Virtual Machine Specification. The format of the constant pool may differ between versions of the Class File Format, so, the minor and major class version numbers should be checked for compatibility. For arrays (ArrayType) and primitive classes, a zero length byte array is returned. Not all target virtual machines support this operation. Use VirtualMachine#canGetConstantPool() to determine if the operation is supported.

constantPoolCountback to summary
public int constantPoolCount()

Implements com.sun.jdi.ReferenceType.constantPoolCount.

Doc from com.sun.jdi.ReferenceType.constantPoolCount.

Returns the number of entries in the constant pool plus one. This corresponds to the constant_pool_count item of the Class File Format in the Java Virtual Machine Specification. For arrays (ArrayType) and primitive classes, the returned constant pool count value is zero. Not all target virtual machines support this operation. Use VirtualMachine#canGetConstantPool() to determine if the operation is supported.

decodeStatusback to summary
pack-priv void decodeStatus(int status)
defaultStratumback to summary
public String defaultStratum()

Implements com.sun.jdi.ReferenceType.defaultStratum.

Always returns non-null stratumID

equalsback to summary
public boolean equals(Object obj)

Overrides com.sun.tools.jdi.TypeImpl.equals.

Implements com.sun.jdi.ReferenceType.equals.

Doc from com.sun.jdi.ReferenceType.equals.

Compares the specified Object with this ReferenceType for equality.

failedToInitializeback to summary
public boolean failedToInitialize()

Implements com.sun.jdi.ReferenceType.failedToInitialize.

Doc from com.sun.jdi.ReferenceType.failedToInitialize.

Determines if initialization failed for this class. See the JVM specification for details on class initialization.

For arrays (ArrayType) and primitive classes, the return value is undefined.

fieldByNameback to summary
public Field fieldByName(String fieldName)

Implements com.sun.jdi.ReferenceType.fieldByName.

Doc from com.sun.jdi.ReferenceType.fieldByName.

Finds the visible Field with the given non-ambiguous name. This method follows the inheritance rules specified in the JLS (8.3.3) to determine visibility.

For arrays (ArrayType) and primitive classes, the returned value is always null.

fieldsback to summary
public List<Field> fields()

Implements com.sun.jdi.ReferenceType.fields.

Doc from com.sun.jdi.ReferenceType.fields.

Returns a list containing each Field declared in this type. Inherited fields are not included. Any synthetic fields created by the compiler are included in the list.

For arrays (ArrayType) and primitive classes, the returned list is always empty.

findTypeback to summary
pack-priv Type findType(String signature) throws ClassNotLoadedException
genericSignatureback to summary
public String genericSignature()

Implements com.sun.jdi.ReferenceType.genericSignature.

Doc from com.sun.jdi.ReferenceType.genericSignature.

Gets the generic signature for this type if there is one. Generic signatures are described in the The Java Virtual Machine Specification.

getClassFileVersionback to summary
private void getClassFileVersion()
getConstantPoolInfoback to summary
private byte[] getConstantPoolInfo()
getFieldMirrorback to summary
pack-priv Field getFieldMirror(long ref)
getInterfacesback to summary
pack-priv List<InterfaceType> getInterfaces()
getMethodMirrorback to summary
pack-priv Method getMethodMirror(long ref)
getModifiersback to summary
pack-priv void getModifiers()
getValueback to summary
public Value getValue(Field sig)

Implements com.sun.jdi.ReferenceType.getValue.

Doc from com.sun.jdi.ReferenceType.getValue.

Gets the Value of a given static Field in this type. The Field must be valid for this type; that is, it must be declared in this type, a superclass, a superinterface, or an implemented interface.

getValuesback to summary
public Map<Field, Value> getValues(List<? extends Field> theFields)

Implements com.sun.jdi.ReferenceType.getValues.

Returns a map of field values

hashCodeback to summary
public int hashCode()

Overrides com.sun.tools.jdi.TypeImpl.hashCode.

Implements com.sun.jdi.ReferenceType.hashCode.

Doc from com.sun.jdi.ReferenceType.hashCode.

Returns the hash code value for this ObjectReference.

Annotations
@Override
indexOfback to summary
pack-priv int indexOf(Method method)
indexOfback to summary
pack-priv int indexOf(Field field)
inheritedTypesback to summary
pack-priv abstract List<? extends ReferenceType> inheritedTypes()
instancesback to summary
public List<ObjectReference> instances(long maxInstances)

Implements com.sun.jdi.ReferenceType.instances.

Doc from com.sun.jdi.ReferenceType.instances.

Returns instances of this ReferenceType. Only instances that are reachable for the purposes of garbage collection are returned.

Not all target virtual machines support this operation. Use VirtualMachine#canGetInstanceInfo() to determine if the operation is supported.

isAbstractback to summary
public boolean isAbstract()

Implements com.sun.jdi.ReferenceType.isAbstract.

Doc from com.sun.jdi.ReferenceType.isAbstract.

Determines if this type was declared abstract.

For arrays (ArrayType) and primitive classes, the return value is undefined.

isAssignableFromback to summary
pack-priv boolean isAssignableFrom(ReferenceType type)
isAssignableFromback to summary
pack-priv boolean isAssignableFrom(ObjectReference object)
isAssignableToback to summary
pack-priv abstract boolean isAssignableTo(ReferenceType type)
isFinalback to summary
public boolean isFinal()

Implements com.sun.jdi.ReferenceType.isFinal.

Doc from com.sun.jdi.ReferenceType.isFinal.

Determines if this type was declared final.

For arrays (ArrayType) and primitive classes, the return value is always true.

isInitializedback to summary
public boolean isInitialized()

Implements com.sun.jdi.ReferenceType.isInitialized.

Doc from com.sun.jdi.ReferenceType.isInitialized.

Determines if this type has been initialized. See the JVM specification for a definition of class verification. For InterfaceType, this method always returns the same value as isPrepared().

For arrays (ArrayType) and primitive classes, the return value is undefined.

isOneDimensionalPrimitiveArrayback to summary
private static boolean isOneDimensionalPrimitiveArray(String signature)
isPackagePrivateback to summary
public boolean isPackagePrivate()

Implements com.sun.jdi.Accessible.isPackagePrivate.

Doc from com.sun.jdi.Accessible.isPackagePrivate.

Determines if this object mirrors a package private item. A package private item is declared with no access specifier. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as java.lang.Integer#TYPE, the return value is always false.

isPreparedback to summary
public boolean isPrepared()

Implements com.sun.jdi.ReferenceType.isPrepared.

Doc from com.sun.jdi.ReferenceType.isPrepared.

Determines if this type has been prepared. See the JVM specification for a definition of class preparation.

For arrays (ArrayType) and primitive classes, the return value is undefined.

isPrivateback to summary
public boolean isPrivate()

Implements com.sun.jdi.Accessible.isPrivate.

Doc from com.sun.jdi.Accessible.isPrivate.

Determines if this object mirrors a private item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as java.lang.Integer#TYPE, the return value is always false.

isProtectedback to summary
public boolean isProtected()

Implements com.sun.jdi.Accessible.isProtected.

Doc from com.sun.jdi.Accessible.isProtected.

Determines if this object mirrors a protected item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always false. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as java.lang.Integer#TYPE, the return value is always false.

isPublicback to summary
public boolean isPublic()

Implements com.sun.jdi.Accessible.isPublic.

Doc from com.sun.jdi.Accessible.isPublic.

Determines if this object mirrors a public item. For ArrayType, the return value depends on the array component type. For primitive arrays the return value is always true. For object arrays, the return value is the same as would be returned for the component type. For primitive classes, such as java.lang.Integer#TYPE, the return value is always true.

isStaticback to summary
public boolean isStatic()

Implements com.sun.jdi.ReferenceType.isStatic.

Doc from com.sun.jdi.ReferenceType.isStatic.

Determines if this type was declared static. Only nested types, can be declared static, so false is returned for any package-level type, array type, or primitive class.

isVerifiedback to summary
public boolean isVerified()

Implements com.sun.jdi.ReferenceType.isVerified.

Doc from com.sun.jdi.ReferenceType.isVerified.

Determines if this type has been verified. See the JVM specification for a definition of class verification.

For arrays (ArrayType) and primitive classes, the return value is undefined.

loaderStringback to summary
pack-priv String loaderString()
locationsOfLineback to summary
public List<Location> locationsOfLine(int lineNumber) throws AbsentInformationException

Implements com.sun.jdi.ReferenceType.locationsOfLine.

Doc from com.sun.jdi.ReferenceType.locationsOfLine.

Returns a List containing all Location objects that map to the given line number.

This method is equivalent to locationsOfLine(vm.getDefaultStratum(), null, lineNumber) - see locationsOfLine(java.lang.String, java.lang.String, int) for more information.

Exceptions
AbsentInformationException:
if there is no line number information for this class.
locationsOfLineback to summary
public List<Location> locationsOfLine(String stratumID, String sourceName, int lineNumber) throws AbsentInformationException

Implements com.sun.jdi.ReferenceType.locationsOfLine.

Doc from com.sun.jdi.ReferenceType.locationsOfLine.

Returns a List containing all Location objects that map to the given line number.

For arrays (ArrayType) and primitive classes, the returned list is always empty. For interfaces (InterfaceType), the returned list will be non-empty only if the interface has executable code in its class initialization at the specified line number. An empty list will be returned if there is no executable code at the specified line number.

Returned list is for the specified stratum (see Location for a description of strata).

Exceptions
AbsentInformationException:
if there is no line number information for this class. Or if sourceName is non-null and source name information is not present.
majorVersionback to summary
public int majorVersion()

Implements com.sun.jdi.ReferenceType.majorVersion.

Doc from com.sun.jdi.ReferenceType.majorVersion.

Returns the class major version number, as defined in the class file format of the Java Virtual Machine Specification. For arrays (ArrayType) and primitive classes, the returned major version number value is zero. Not all target virtual machines support this operation. Use VirtualMachine#canGetClassFileVersion() to determine if the operation is supported.

markPreparedback to summary
pack-priv void markPrepared()
methodsback to summary
public List<Method> methods()

Implements com.sun.jdi.ReferenceType.methods.

Doc from com.sun.jdi.ReferenceType.methods.

Returns a list containing each Method declared directly in this type. Inherited methods are not included. Constructors, the initialization method if any, and any synthetic methods created by the compiler are included in the list.

For arrays (ArrayType) and primitive classes, the returned list is always empty.

methods1_4back to summary
private List<Method> methods1_4()
methodsByNameback to summary
public List<Method> methodsByName(String name)

Implements com.sun.jdi.ReferenceType.methodsByName.

Doc from com.sun.jdi.ReferenceType.methodsByName.

Returns a List containing each visible Method that has the given name. This is most commonly used to find overloaded methods.

Overridden and hidden methods are not included. See JLS (8.4.8) for details.

For arrays (ArrayType) and primitive classes, the returned list is always empty.

methodsByNameback to summary
public List<Method> methodsByName(String name, String signature)

Implements com.sun.jdi.ReferenceType.methodsByName.

Doc from com.sun.jdi.ReferenceType.methodsByName.

Returns a List containing each visible Method that has the given name and signature. The signature string is the JNI signature for the target method:

  • ()V
  • ([Ljava/lang/String;)V
  • (IIII)Z
This method follows the inheritance rules specified in the JLS (8.4.8) to determine visibility.

At most one method in the list is a concrete method and a component of ClassType; any other methods in the list are abstract. Use ClassType#concreteMethodByName to retrieve only the matching concrete method.

For arrays (ArrayType) and primitive classes, the returned list is always empty.

minorVersionback to summary
public int minorVersion()

Implements com.sun.jdi.ReferenceType.minorVersion.

Doc from com.sun.jdi.ReferenceType.minorVersion.

Returns the class minor version number, as defined in the class file format of the Java Virtual Machine Specification. For arrays (ArrayType) and primitive classes, the returned minor version number value is zero. Not all target virtual machines support this operation. Use VirtualMachine#canGetClassFileVersion() to determine if the operation is supported.

modifiersback to summary
public int modifiers()

Implements com.sun.jdi.Accessible.modifiers.

Doc from com.sun.jdi.Accessible.modifiers.

Returns the Java programming language modifiers, encoded in an integer.

The modifier encodings are defined in The Java Virtual Machine Specification in the access_flag tables for classes(section 4.1), fields(section 4.5), and methods(section 4.6).

moduleback to summary
public ModuleReference module()

Overrides default com.sun.jdi.ReferenceType.module.

Doc from com.sun.jdi.ReferenceType.module.

Gets the module object which contains the class corresponding to this type. Not all target virtual machines support this operation. Use VirtualMachine#canGetModuleInfo() to determine if the operation is supported.

nestedTypesback to summary
public List<ReferenceType> nestedTypes()

Implements com.sun.jdi.ReferenceType.nestedTypes.

Doc from com.sun.jdi.ReferenceType.nestedTypes.

Returns a List containing ReferenceType objects that are declared within this type and are currently loaded into the Virtual Machine. Both static nested types and non-static nested types (that is, inner types) are included. Local inner types (declared within a code block somewhere in this reference type) are also included in the returned list.

For arrays (ArrayType) and primitive classes, the returned list is always empty.

noticeRedefineClassback to summary
pack-priv void noticeRedefineClass()
refback to summary
pack-priv long ref()
setGenericSignatureback to summary
pack-priv void setGenericSignature(String signature)
setSignatureback to summary
pack-priv void setSignature(String signature)
setStatusback to summary
pack-priv void setStatus(int status)
signatureback to summary
public String signature()

Implements abstract com.sun.tools.jdi.TypeImpl.signature.

Implements com.sun.jdi.Type.signature.

Doc from com.sun.jdi.Type.signature.

Returns the type signature for this type. The result is of the same form as the string returned by Class#descriptorString(). The returned string is a type descriptor conforming to JVMS 4.3.2 if this type can be described nominally. Otherwise, the returned string is not a type descriptor.

sourceDebugExtensionback to summary
public String sourceDebugExtension() throws AbsentInformationException

Implements com.sun.jdi.ReferenceType.sourceDebugExtension.

Doc from com.sun.jdi.ReferenceType.sourceDebugExtension.

Get the source debug extension of this type.

Not all target virtual machines support this operation. Use canGetSourceDebugExtension() to determine if the operation is supported.

Exceptions
AbsentInformationException:
if the extension is not specified
sourceDebugExtensionInfoback to summary
private SDE sourceDebugExtensionInfo()
sourceNameback to summary
public String sourceName() throws AbsentInformationException

Implements com.sun.jdi.ReferenceType.sourceName.

Doc from com.sun.jdi.ReferenceType.sourceName.

Gets an identifying name for the source corresponding to the declaration of this type. Interpretation of this string is the responsibility of the source repository mechanism.

The returned name is dependent on VM's default stratum (VirtualMachine#getDefaultStratum()). In the reference implementation, when using the base stratum, the returned string is the unqualified name of the source file containing the declaration of this type. In other strata the returned source name is the first source name for that stratum. Since other languages may have more than one source name for a reference type, the use of Location#sourceName() or sourceNames(String) is preferred.

For arrays (ArrayType) and primitive classes, AbsentInformationException is always thrown.

Exceptions
AbsentInformationException:
if the source name is not known
sourceNamesback to summary
public List<String> sourceNames(String stratumID) throws AbsentInformationException

Implements com.sun.jdi.ReferenceType.sourceNames.

Doc from com.sun.jdi.ReferenceType.sourceNames.

Gets the identifying names for all the source corresponding to the declaration of this type. Interpretation of these names is the responsibility of the source repository mechanism.

The returned names are for the specified stratum (see Location for a description of strata). In the reference implementation, when using the Java programming language stratum, the returned List contains one element: a String which is the unqualified name of the source file containing the declaration of this type. In other strata the returned source names are all the source names defined for that stratum.

Exceptions
AbsentInformationException:
if the source names are not known.

For arrays (ArrayType) and primitive classes, AbsentInformationException is always thrown.

sourcePathsback to summary
public List<String> sourcePaths(String stratumID) throws AbsentInformationException

Implements com.sun.jdi.ReferenceType.sourcePaths.

Doc from com.sun.jdi.ReferenceType.sourcePaths.

Gets the paths to the source corresponding to the declaration of this type. Interpretation of these paths is the responsibility of the source repository mechanism.

The returned paths are for the specified stratum (see Location for a description of strata). In the reference implementation, for strata which do not explicitly specify source path (the Java programming language stratum never does), the returned strings are the sourceNames(String) prefixed by the package name of this ReferenceType converted to a platform dependent path. For example, on a Windows platform, java.lang.Thread would return a List containing one element: "java\lang\Thread.java".

Exceptions
AbsentInformationException:
if the source names are not known.

For arrays (ArrayType) and primitive classes, AbsentInformationException is always thrown.

stratumback to summary
pack-priv SDE.Stratum stratum(String stratumID)
updateStatusback to summary
pack-priv void updateStatus()
validateFieldAccessback to summary
pack-priv void validateFieldAccess(Field field)
validateFieldSetback to summary
pack-priv void validateFieldSet(Field field)
visibleFieldsback to summary
public List<Field> visibleFields()

Implements com.sun.jdi.ReferenceType.visibleFields.

Doc from com.sun.jdi.ReferenceType.visibleFields.

Returns a list containing each unhidden and unambiguous Field in this type. Each field that can be accessed from the class or its instances with its simple name is included. Fields that are ambiguously multiply inherited or fields that are hidden by fields with the same name in a more recently inherited class cannot be accessed by their simple names and are not included in the returned list. All other inherited fields are included. See JLS section 8.3 for details.

For arrays (ArrayType) and primitive classes, the returned list is always empty.

visibleMethodsback to summary
public List<Method> visibleMethods()

Implements com.sun.jdi.ReferenceType.visibleMethods.

Doc from com.sun.jdi.ReferenceType.visibleMethods.

Returns a list containing each Method declared or inherited by this type. Methods from superclasses or superinterfaces that have been hidden or overridden are not included.

Note that despite this exclusion, multiple inherited methods with the same signature can be present in the returned list, but at most one can be a member of a ClassType. See JLS section 8.4.8 for details.

For arrays (ArrayType) and primitive classes, the returned list is always empty.