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

public abstract Class MethodImpl

extends TypeComponentImpl
implements Method
Class Inheritance
All Implemented Interfaces
com.sun.jdi.Method, java.lang.Comparable, com.sun.jdi.Locatable, com.sun.jdi.TypeComponent, com.sun.jdi.Accessible, com.sun.jdi.Mirror
Known Direct Subclasses
com.sun.tools.jdi.NonConcreteMethodImpl, com.sun.tools.jdi.ConcreteMethodImpl
Imports
java.util.ArrayList, .List, com.sun.jdi.AbsentInformationException, .ArrayReference, .ArrayType, .ClassNotLoadedException, .InterfaceType, .InvalidTypeException, .Location, .Method, .Type, .Value, .VirtualMachine

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv MethodImpl.ReturnContainer
private JNITypeParser
Inherited from com.sun.tools.jdi.TypeComponentImpl:
declaringTypegenericSignaturenamerefsignature

Constructor Summary

AccessConstructor and Description
pack-priv
MethodImpl(VirtualMachine vm, ReferenceTypeImpl declaringType, long ref, String name, String signature, String genericSignature, int modifiers)

Method Summary

Modifier and TypeMethod and Description
pack-priv abstract List<Location>
allLineLocations(SDE.Stratum stratum, String sourceName)

public final List<Location>
allLineLocations()

Implements com.sun.jdi.Method.allLineLocations.

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

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

Implements com.sun.jdi.Method.allLineLocations.

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

pack-priv abstract int
public List<String>
pack-priv Type
argumentType(int index)

public List<String>
argumentTypeNames()

Implements com.sun.jdi.Method.argumentTypeNames.

Returns a list containing a text representation of the type of each formal parameter of this method.

public List<Type>
argumentTypes()

Implements com.sun.jdi.Method.argumentTypes.

Returns a list containing the type of each formal parameter of this method.

pack-priv LineInfo
codeIndexToLineInfo(SDE.Stratum stratum, long codeIndex)

public int
compareTo(Method method)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

pack-priv static MethodImpl
createMethodImpl(VirtualMachine vm, ReferenceTypeImpl declaringType, long ref, String name, String signature, String genericSignature, int modifiers)

public boolean
equals(Object obj)

Overrides com.sun.tools.jdi.MirrorImpl.equals.

Implements com.sun.jdi.Method.equals.

Compares the specified Object with this method for equality.

public Type
findType(String signature)

pack-priv MethodImpl.ReturnContainer
pack-priv void
handleVarArgs(List<Value> arguments)

public int
hashCode()

Overrides com.sun.tools.jdi.MirrorImpl.hashCode.

Implements com.sun.jdi.Method.hashCode.

Returns the hash code value for this Method.

public boolean
isAbstract()

Implements com.sun.jdi.Method.isAbstract.

Determine if this method is abstract.

public boolean
isBridge()

Implements com.sun.jdi.Method.isBridge.

Determine if this method is a bridge method.

public boolean
isConstructor()

Implements com.sun.jdi.Method.isConstructor.

Determine if this method is a constructor.

public boolean
isDefault()

Overrides default com.sun.jdi.Method.isDefault.

Determine if this method is a default method

public boolean
isNative()

Implements com.sun.jdi.Method.isNative.

Determine if this method is native.

public boolean
isObsolete()

Implements com.sun.jdi.Method.isObsolete.

Determine if this method is obsolete.

public boolean
isStaticInitializer()

Implements com.sun.jdi.Method.isStaticInitializer.

Determine if this method is a static initializer.

public boolean
isSynchronized()

Implements com.sun.jdi.Method.isSynchronized.

Determine if this method is synchronized.

public boolean
isVarArgs()

Implements com.sun.jdi.Method.isVarArgs.

Determine if this method accepts a variable number of arguments.

pack-priv abstract List<Location>
locationsOfLine(SDE.Stratum stratum, String sourceName, int lineNumber)

public final List<Location>
locationsOfLine(int lineNumber)

Implements com.sun.jdi.Method.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.Method.locationsOfLine.

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

private String
public Type
returnType()

Implements com.sun.jdi.Method.returnType.

Returns the return type, as specified in the declaration of this method.

public String

Returns:

a text representation of the declared return type of this method.
returnTypeName
()

Implements com.sun.jdi.Method.returnTypeName.

Returns a text representation of the return type, as specified in the declaration of this method.

public String
toString()

Overrides java.lang.Object.toString.

Implements com.sun.jdi.Mirror.toString.

Returns a String describing this mirror

pack-priv List<Value>
Inherited from com.sun.tools.jdi.TypeComponentImpl:
declaringTypegenericSignatureisFinalisModifierSetisPackagePrivateisPrivateisProtectedisPublicisStaticisSyntheticmodifiersnamerefsignature

Field Detail

retValContainerback to summary
pack-priv MethodImpl.ReturnContainer retValContainer
signatureParserback to summary
private JNITypeParser signatureParser

Constructor Detail

MethodImplback to summary
pack-priv MethodImpl(VirtualMachine vm, ReferenceTypeImpl declaringType, long ref, String name, String signature, String genericSignature, int modifiers)

Method Detail

allLineLocationsback to summary
pack-priv abstract List<Location> allLineLocations(SDE.Stratum stratum, String sourceName) throws AbsentInformationException
allLineLocationsback to summary
public final List<Location> allLineLocations() throws AbsentInformationException

Implements com.sun.jdi.Method.allLineLocations.

Doc from com.sun.jdi.Method.allLineLocations.

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

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 (non-native, non-abstract) method.
allLineLocationsback to summary
public List<Location> allLineLocations(String stratumID, String sourceName) throws AbsentInformationException

Implements com.sun.jdi.Method.allLineLocations.

Doc from com.sun.jdi.Method.allLineLocations.

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

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 is ordered by code index (from low to high).

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.

If the method is native or abstract, an empty list is returned.

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 (non-native, non-abstract) method. Or if sourceName is non-null and source name information is not present.
argSlotCountback to summary
pack-priv abstract int argSlotCount() throws AbsentInformationException
argumentSignaturesback to summary
public List<String> argumentSignatures()
argumentTypeback to summary
pack-priv Type argumentType(int index) throws ClassNotLoadedException
argumentTypeNamesback to summary
public List<String> argumentTypeNames()

Implements com.sun.jdi.Method.argumentTypeNames.

Doc from com.sun.jdi.Method.argumentTypeNames.

Returns a list containing a text representation of the type of each formal parameter of this method.

This list is always available even if the types have not yet been created or loaded.

argumentTypesback to summary
public List<Type> argumentTypes() throws ClassNotLoadedException

Implements com.sun.jdi.Method.argumentTypes.

Doc from com.sun.jdi.Method.argumentTypes.

Returns a list containing the type of each formal parameter of this method.

Note

if there is any parameter whose type is a reference type (class, interface, or array) and it has not been created or loaded by the declaring type's class loader - that is, declaringType() .classLoader(), then ClassNotLoadedException will be thrown. Also, a reference type may have been loaded but not yet prepared, in which case the list will be returned but attempts to perform some operations on the type (e.g. fields()) will throw a ClassNotPreparedException. Use ReferenceType#isPrepared() to determine if a reference type is prepared.

Exceptions
ClassNotLoadedException:
if the type has not yet been loaded through the appropriate class loader.
codeIndexToLineInfoback to summary
pack-priv LineInfo codeIndexToLineInfo(SDE.Stratum stratum, long codeIndex)
compareToback to summary
public int compareTo(Method method)

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.

createMethodImplback to summary
pack-priv static MethodImpl createMethodImpl(VirtualMachine vm, ReferenceTypeImpl declaringType, long ref, String name, String signature, String genericSignature, int modifiers)
equalsback to summary
public boolean equals(Object obj)

Overrides com.sun.tools.jdi.MirrorImpl.equals.

Implements com.sun.jdi.Method.equals.

Doc from com.sun.jdi.Method.equals.

Compares the specified Object with this method for equality.

findTypeback to summary
public Type findType(String signature) throws ClassNotLoadedException
getReturnValueContainerback to summary
pack-priv MethodImpl.ReturnContainer getReturnValueContainer()
handleVarArgsback to summary
pack-priv void handleVarArgs(List<Value> arguments) throws ClassNotLoadedException, InvalidTypeException
hashCodeback to summary
public int hashCode()

Overrides com.sun.tools.jdi.MirrorImpl.hashCode.

Implements com.sun.jdi.Method.hashCode.

Doc from com.sun.jdi.Method.hashCode.

Returns the hash code value for this Method.

Annotations
@Override
isAbstractback to summary
public boolean isAbstract()

Implements com.sun.jdi.Method.isAbstract.

Doc from com.sun.jdi.Method.isAbstract.

Determine if this method is abstract.

isBridgeback to summary
public boolean isBridge()

Implements com.sun.jdi.Method.isBridge.

Doc from com.sun.jdi.Method.isBridge.

Determine if this method is a bridge method. Bridge methods are defined in The Java Language Specification.

isConstructorback to summary
public boolean isConstructor()

Implements com.sun.jdi.Method.isConstructor.

Doc from com.sun.jdi.Method.isConstructor.

Determine if this method is a constructor.

isDefaultback to summary
public boolean isDefault()

Overrides default com.sun.jdi.Method.isDefault.

Doc from com.sun.jdi.Method.isDefault.

Determine if this method is a default method

isNativeback to summary
public boolean isNative()

Implements com.sun.jdi.Method.isNative.

Doc from com.sun.jdi.Method.isNative.

Determine if this method is native.

isObsoleteback to summary
public boolean isObsolete()

Implements com.sun.jdi.Method.isObsolete.

Doc from com.sun.jdi.Method.isObsolete.

Determine if this method is obsolete.

isStaticInitializerback to summary
public boolean isStaticInitializer()

Implements com.sun.jdi.Method.isStaticInitializer.

Doc from com.sun.jdi.Method.isStaticInitializer.

Determine if this method is a static initializer.

isSynchronizedback to summary
public boolean isSynchronized()

Implements com.sun.jdi.Method.isSynchronized.

Doc from com.sun.jdi.Method.isSynchronized.

Determine if this method is synchronized.

isVarArgsback to summary
public boolean isVarArgs()

Implements com.sun.jdi.Method.isVarArgs.

Doc from com.sun.jdi.Method.isVarArgs.

Determine if this method accepts a variable number of arguments.

locationsOfLineback to summary
pack-priv abstract List<Location> locationsOfLine(SDE.Stratum stratum, String sourceName, int lineNumber) throws AbsentInformationException
locationsOfLineback to summary
public final List<Location> locationsOfLine(int lineNumber) throws AbsentInformationException

Implements com.sun.jdi.Method.locationsOfLine.

Doc from com.sun.jdi.Method.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 method.
locationsOfLineback to summary
public List<Location> locationsOfLine(String stratumID, String sourceName, int lineNumber) throws AbsentInformationException

Implements com.sun.jdi.Method.locationsOfLine.

Doc from com.sun.jdi.Method.locationsOfLine.

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

Returns a list containing each Location that maps to the given line. The returned list will contain a location for each disjoint range of code indices that have been assigned to the given line by the compiler and/or VM. Each returned location corresponds to the beginning of this range. An empty list will be returned if there is no executable code at the specified line number; specifically, native and abstract methods will always return an empty list.

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 method. Or if sourceName is non-null and source name information is not present.
returnSignatureback to summary
private String returnSignature()
returnTypeback to summary
public Type returnType() throws ClassNotLoadedException

Implements com.sun.jdi.Method.returnType.

Doc from com.sun.jdi.Method.returnType.

Returns the return type, as specified in the declaration of this method.

Note

if the return type of this method is a reference type (class, interface, or array) and it has not been created or loaded by the declaring type's class loader - that is, declaringType() .classLoader(), then ClassNotLoadedException will be thrown. Also, a reference type may have been loaded but not yet prepared, in which case the type will be returned but attempts to perform some operations on the returned type (e.g. fields()) will throw a ClassNotPreparedException. Use ReferenceType#isPrepared() to determine if a reference type is prepared.

Exceptions
ClassNotLoadedException:
if the type has not yet been created or loaded through the appropriate class loader.
returnTypeNameback to summary
public String returnTypeName()

Implements com.sun.jdi.Method.returnTypeName.

Doc from com.sun.jdi.Method.returnTypeName.

Returns a text representation of the return type, as specified in the declaration of this method.

This type name is always available even if the type has not yet been created or loaded.

Returns:String

a text representation of the declared return type of this method.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements com.sun.jdi.Mirror.toString.

Doc from com.sun.jdi.Mirror.toString.

Returns a String describing this mirror

validateAndPrepareArgumentsForInvokeback to summary
pack-priv List<Value> validateAndPrepareArgumentsForInvoke(List<? extends Value> origArguments) throws ClassNotLoadedException, InvalidTypeException
com.sun.tools.jdi back to summary

pack-priv Class MethodImpl.ArgumentContainer

extends Object
implements ValueContainer
Class Inheritance
All Implemented Interfaces
com.sun.tools.jdi.ValueContainer

Field Summary

Modifier and TypeField and Description
pack-priv int

Constructor Summary

AccessConstructor and Description
pack-priv
ArgumentContainer(int index)

Method Summary

Modifier and TypeMethod and Description
public Type
public String
public Type
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

indexback to summary
pack-priv int index

Constructor Detail

ArgumentContainerback to summary
pack-priv ArgumentContainer(int index)

Method Detail

findTypeback to summary
public Type findType(String signature) throws ClassNotLoadedException

Implements com.sun.tools.jdi.ValueContainer.findType.

signatureback to summary
public String signature()

Implements com.sun.tools.jdi.ValueContainer.signature.

typeback to summary
public Type type() throws ClassNotLoadedException

Implements com.sun.tools.jdi.ValueContainer.type.

typeNameback to summary
public String typeName()

Implements com.sun.tools.jdi.ValueContainer.typeName.

com.sun.tools.jdi back to summary

pack-priv Class MethodImpl.ReturnContainer

extends Object
implements ValueContainer
Class Inheritance
All Implemented Interfaces
com.sun.tools.jdi.ValueContainer

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Type
public String
public Type
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ReturnContainerback to summary
pack-priv ReturnContainer()

Method Detail

findTypeback to summary
public Type findType(String signature) throws ClassNotLoadedException

Implements com.sun.tools.jdi.ValueContainer.findType.

signatureback to summary
public String signature()

Implements com.sun.tools.jdi.ValueContainer.signature.

typeback to summary
public Type type() throws ClassNotLoadedException

Implements com.sun.tools.jdi.ValueContainer.type.

typeNameback to summary
public String typeName()

Implements com.sun.tools.jdi.ValueContainer.typeName.