TypeComponent
for general information about Field and Method mirrors.
ObjectReference, ReferenceType
| Modifier and Type | Method and Description |
|---|---|
| public List | Returns: a List of all source lineLocation objects.Returns a list containing a |
| public List | Returns: a List of all source lineLocation objects.The stratum to retrieve information from
or stratum, String null for the ReferenceType#defaultStratum()Return locations only within this
source file or sourceName)null to return locations.Returns a list containing a |
| public List | Returns: the list ofLocalVariable arguments.
If there are no arguments, a zero-length list is returned.Returns a list containing each |
| public List | argumentTypeNames()
Returns a list containing a text representation of the type of each formal parameter of this method. |
| public List | |
| public byte[] | Returns: the array of bytecodes; abstract and native methods will return a zero-length array.Returns an array containing the bytecodes for this method. |
| public boolean | |
| public int | |
| public boolean | Returns: true if the method is declared abstract;
false otherwise.Determine if this method is abstract. |
| public boolean | Returns: true if the method is a bridge method,
false otherwise.Determine if this method is a bridge method. |
| public boolean | Returns: true if the method is a constructor;
false otherwise.Determine if this method is a constructor. |
| public default boolean | Returns: true if the method is declared default;
false otherwise.Determine if this method is a default method |
| public boolean | Returns: true if the method is declared native;
false otherwise.Determine if this method is native. |
| public boolean | |
| public boolean | Returns: true if the method is a static initializer;
false otherwise.Determine if this method is a static initializer. |
| public boolean | Returns: true if the method is declared synchronized;
false otherwise.Determine if this method is synchronized. |
| public boolean | Returns: true if the method accepts a variable number
of arguments, false otherwise.Determine if this method accepts a variable number of arguments. |
| public Location | Returns: theLocation of this mirror, or null if
this is an abstract method; native methods will return a
Location object whose codeIndex is -1.Redeclares com. Returns the |
| public Location | Returns: theLocation corresponding to the
given code index or null if the specified code index is not a
valid code index for this method (native and abstract methods
will always return null).Returns a |
| public List | Returns: a List ofLocation objects that map to
the given line number.the line number lineNumber)Returns a List containing all |
| public List | Returns: a List ofLocation objects that map to
the given line number.the stratum to use for comparing line number
and source name, or null to use the default
stratum stratum, String the source name containing the
line number, or null to match all
source names sourceName, int the line number lineNumber)Returns a List containing all |
| public Type | Returns: the returnType of this method.Returns the return type, as specified in the declaration of this method. |
| public String | Returns: aString containing the return type name.Returns a text representation of the return type, as specified in the declaration of this method. |
| public List | Returns: the list ofLocalVariable 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.Returns a list containing each |
| public List | Returns: the list ofLocalVariable objects of the given
name.
If there are no matching local variables, a zero-length list
is returned.Returns a list containing each |
| allLineLocations | back to summary |
|---|---|
| public List Returns a list containing a
This method is equivalent to
| |
| allLineLocations | back to summary |
|---|---|
| public List Returns a list containing a
Each location maps a source line to a range of code
indices.
The beginning of the range can be determined through
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
| |
| arguments | back to summary |
|---|---|
| public List Returns a list containing each
| |
| argumentTypeNames | back to summary |
|---|---|
| public List 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. | |
| argumentTypes | back to summary |
|---|---|
| public List 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,
| |
| bytecodes | back to summary |
|---|---|
| public byte[] bytecodes() Returns an array containing the bytecodes for this method.
Not all target virtual machines support this operation.
Use
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Compares the specified Object with this method for equality.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Returns the hash code value for this Method.
| |
| isAbstract | back to summary |
|---|---|
| public boolean isAbstract() Determine if this method is abstract.
| |
| isBridge | back to summary |
|---|---|
| public boolean isBridge() Determine if this method is a bridge method. Bridge methods are defined in The Java Language Specification.
| |
| isConstructor | back to summary |
|---|---|
| public boolean isConstructor() Determine if this method is a constructor.
| |
| isDefault | back to summary |
|---|---|
| public default boolean isDefault() Determine if this method is a default method
| |
| isNative | back to summary |
|---|---|
| public boolean isNative() Determine if this method is native.
| |
| isObsolete | back to summary |
|---|---|
| public boolean isObsolete() Determine if this method is obsolete.
| |
| isStaticInitializer | back to summary |
|---|---|
| public boolean isStaticInitializer() Determine if this method is a static initializer.
| |
| isSynchronized | back to summary |
|---|---|
| public boolean isSynchronized() Determine if this method is synchronized.
| |
| isVarArgs | back to summary |
|---|---|
| public boolean isVarArgs() Determine if this method accepts a variable number of arguments.
| |
| location | back to summary |
|---|---|
| public Location location() Redeclares com. Returns the | |
| locationOfCodeIndex | back to summary |
|---|---|
| public Location locationOfCodeIndex(long codeIndex) Returns a | |
| locationsOfLine | back to summary |
|---|---|
| public List Returns a List containing all
This method is equivalent to
| |
| locationsOfLine | back to summary |
|---|---|
| public List Returns a List containing all
Returns a list containing each
Returned list is for the specified stratum
(see
| |
| returnType | back to summary |
|---|---|
| public Type returnType() throws ClassNotLoadedException 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,
| |
| returnTypeName | back to summary |
|---|---|
| public String 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.
| |
| variables | back to summary |
|---|---|
| public List Returns a list containing each
| |
| variablesByName | back to summary |
|---|---|
| public List Returns a list containing each
| |