|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.squawk.Member
com.sun.squawk.Method
public final class Method
An instance of Method encapsulates the information about the
method of a class. This includes the name of the method, its return type,
parameter types, access flags etc.
| Method Summary | |
|---|---|
static int |
getLineNumber(int[] lnt,
int bci)
Gets the line number for a bytecode index |
int[] |
getLineNumberTable()
Gets the table mapping instruction addresses to the source line numbers that start at the addresses. |
ScopedLocalVariable[] |
getLocalVariableTable()
Gets a table describing the scope, name and type of each local variable in the method. |
Klass[] |
getParameterTypes()
Gets the formal parameter types, in declaration order, of this method. |
Klass |
getReturnType()
Gets the formal return type of this method. |
Klass[] |
getRuntimeParameterTypes(boolean reverseParameters)
Gets the runtime parameter types, in declaration order, of this method. |
boolean |
isAbstract()
Determines if this method is an abstract method. |
boolean |
isClassInitializer()
Determines if this method is a class initialization method |
boolean |
isConstructor()
Determines if this method is a constructor. |
boolean |
isForceInlined()
Returns whether this method is forceably inlined by the translator. |
boolean |
isHosted()
Returns whether this method should only be called in a hosted environment. |
boolean |
isInterpreterInvoked()
Returns whether this method is only invoked from the interpreter, and never from Java code. |
boolean |
isNative()
Determines if this method is a native method. |
boolean |
isNativeDueToPragma()
Returns whether this native method is only native due to a pragma. |
boolean |
isNotInlined()
Returns whether this method is never inlined by the translator. |
boolean |
isReplacementConstructor()
Returns whether the body of this method is used to replace the body of a constructor with the same signature. |
boolean |
isSynchronized()
Determines if this method is a synchronized method. |
static String |
lineNumberTableAsString(int[] lnt)
Converts a given line number table as a string of numbers where each pair of numbers represents an ip address and a line number. |
boolean |
requiresClassClinit()
Tests to see if this method requires a CLASS_CLINIT instruction to be emitted before the body of the method's bytecodes. |
| Methods inherited from class com.sun.squawk.Member |
|---|
getDefiningClass, getFullyQualifiedName, getModifiers, getName, getOffset, hashCode, isAccessibleFrom, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isSourceSynthetic, isStatic, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public boolean isHosted()
public boolean isReplacementConstructor()
public boolean isInterpreterInvoked()
public boolean isForceInlined()
public boolean isNotInlined()
public boolean isNativeDueToPragma()
public boolean isNative()
public boolean isAbstract()
public boolean isSynchronized()
public boolean isConstructor()
public boolean isClassInitializer()
public Klass getReturnType()
public Klass[] getParameterTypes()
public boolean requiresClassClinit()
public Klass[] getRuntimeParameterTypes(boolean reverseParameters)
reverseParameters - true if the parameters are normally pushed right-to-left
public int[] getLineNumberTable()
public ScopedLocalVariable[] getLocalVariableTable()
public static String lineNumberTableAsString(int[] lnt)
lnt - the table mapping instruction addresses to the
source line numbers that start at the addresses.
The table is encoded as an int array where the high
16-bits of each element is an instruction address and
the low 16-bits is the corresponding source line
public static int getLineNumber(int[] lnt,
int bci)
lnt - the table mapping bytecode indexes to the
source line numbers that start at the addresses.
The table is encoded as an int array where the high
16-bits of each element is an instruction address and
the low 16-bits is the corresponding source linebci - a bytecode index
|
Sun SPOT API |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||