Spec-Zone .ru
спецификации, руководства, описания, API
|
|
Java Debug Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A static or instance method in the target VM. See TypeComponent
for general information about Field and Method mirrors.
ObjectReference
,
ReferenceType
Method Summary | |
List |
allLineLocations()
Returns the beginning Location objects for each
executable source line in this method. |
List |
arguments()
Returns a list containing each LocalVariable that is
declared as an argument of this method. |
List |
argumentTypeNames()
Returns a text representation of all declared argument types of this method. |
List |
argumentTypes()
Returns the list containing the type of each argument. |
byte[] |
bytecodes()
Returns an array containing the bytecodes for this method. |
boolean |
equals(Object obj)
Compares the specified Object with this method for equality. |
int |
hashCode()
Returns the hash code value for this Method. |
boolean |
isAbstract()
Determine if this method is abstract. |
boolean |
isConstructor()
Determine if this method is a constructor. |
boolean |
isNative()
Determine if this method is native. |
boolean |
isStaticInitializer()
Determine if this method is a static initializer. |
boolean |
isSynchronized()
Determine if this method is synchronized. |
Location |
locationOfCodeIndex(long codeIndex)
Returns a Location for the given code index. |
List |
locationsOfLine(int lineNumber)
Returns a list containing each Location that maps
to the given line. |
Type |
returnType()
Returns the return type of the this Method . |
String |
returnTypeName()
Returns a text representation of the declared return type of this method. |
List |
variables()
Returns a list containing each LocalVariable declared
in this method. |
List |
variablesByName(String name)
Returns a list containing each LocalVariable of a
given name in this method. |
Methods inherited from interface com.sun.jdi.TypeComponent |
declaringType, isFinal, isStatic, isSynthetic, name, signature |
Methods inherited from interface com.sun.jdi.Mirror |
toString, virtualMachine |
Methods inherited from interface com.sun.jdi.Accessible |
isPackagePrivate, isPrivate, isProtected, isPublic, modifiers |
Methods inherited from interface com.sun.jdi.Locatable |
location |
Methods inherited from interface java.lang.Comparable |
compareTo |
Method Detail |
public String returnTypeName()
public Type returnType() throws ClassNotLoadedException
Method
. For methods
returning primitive values,
an appropriate PrimitiveType
is always returned. For methods
returning object values,
the appropriate ReferenceType
is returned if it has
been loaded through the enclosing type's (that is, the
type returned by TypeComponent#enclosingType
) class loader.Type
of this method.ClassNotLoadedException
- if the type has not yet been loaded
through the appropriate class loader.public List argumentTypeNames()
public List argumentTypes() throws ClassNotLoadedException
PrimitiveType
is always returned.
For object arguments,
the appropriate ReferenceType
is returned if it has
been loaded through the enclosing type's (that is, the
type returned by TypeComponent#enclosingType
) class loader.ClassNotLoadedException
- if the type has not yet been loaded
through the appropriate class loader.public boolean isAbstract()
true
if the method is declared abstract;
false otherwise.public boolean isSynchronized()
true
if the method is declared synchronized;
false otherwise.public boolean isNative()
true
if the method is declared native;
false otherwise.public boolean isConstructor()
true
if the method is a constructor;
false otherwise.public boolean isStaticInitializer()
true
if the method is a static initializer;
false otherwise.public List allLineLocations() throws AbsentInformationException
Location
objects 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.
Location
objects.AbsentInformationException
- if there is no line number
information for this (non-native, non-abstract) method.public List locationsOfLine(int lineNumber) throws AbsentInformationException
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.lineNumber
- the line numberLocation
objects that map to
the given line number.AbsentInformationException
- if there is no line number
information for this method.InvalidLineNumberException
- if there is no executable code
in this method associated with the given line.public Location locationOfCodeIndex(long codeIndex)
Location
for the given code index.Location
correspoding to the the
given code index.InvalidCodeIndexException
- if there is no valid location
at the specified code indexpublic List variables() throws AbsentInformationException
LocalVariable
declared
in this method. The list includes any variable declared in any
scope within the method. It may contain multiple variables of the
same name declared within disjoint scopes. Arguments are considered
local variables and will be present in the returned list.LocalVariable
objects which mirror
local variables declared in this method in the target VM.
If there are no local variables, a zero-length list is returned.AbsentInformationException
- if there is no variable
information for this method.NativeMethodException
- if this operation is attempted
for a native method.public List variablesByName(String name) throws AbsentInformationException
LocalVariable
of a
given name in this method.
Multiple variables can be returned
if the same variable name is used in disjoint
scopes within the method.LocalVariable
objects of the given
name.
If there are no matching local variables, a zero-length list is returned.AbsentInformationException
- if there is no variable
information for this method.NativeMethodException
- if this operation is attempted
for a native method.public List arguments() throws AbsentInformationException
LocalVariable
that is
declared as an argument of this method.LocalVariable
arguments.
If there are no arguments, a zero-length list is returned.AbsentInformationException
- if there is no variable
information for this method.NativeMethodException
- if this operation is attempted
for a native method.public byte[] bytecodes()
Not all target VMs support this query. See VirtualMachine#canGetBytecodes to determine if the operation is supported.
java.lang.UnsupportedOperationException
- if the target
VM does not support the retrieval of bytecodes.public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
Java Debug Interface | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |