|
" 2013 FRC Java 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 | |
---|---|
boolean |
equals(Object other)
Indicates whether some other object is "equal to" this one. |
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. |
int |
getParameterCount()
Returns the number of parameters for this method. |
int |
getParametersSize()
Return the number of words used as parameters to this 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. |
int |
hashCode()
Gets the hash code. |
void |
invoke(Object[] args)
DO NOT USE |
boolean |
isAbstract()
Determines if this method is an abstract method. |
boolean |
isAllowInlined()
Returns whether this method is allowed to be inlined in extra circumstances by the translator. |
boolean |
isClassInitializer()
Determines if this method is a class initialization method |
boolean |
isConstructor()
Determines if this method is a constructor. |
boolean |
isDefaultConstructor()
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, isAccessibleFrom, isFinal, isPackagePrivate, isPrivate, isProtected, isPublic, isSourceSynthetic, isStatic, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int hashCode()
Member
hashCode
in class Member
Object.equals(java.lang.Object)
,
Hashtable
public boolean equals(Object other)
Object
The equals
method implements an equivalence relation:
x
,
x.equals(x)
should return true
.
x
and
y
, x.equals(y)
should return
true
if and only if y.equals(x)
returns
true
.
x
,
y
, and z
, if x.equals(y)
returns true
and y.equals(z)
returns
true
, then x.equals(z)
should return
true
.
x
and y
, multiple invocations of x.equals(y)
consistently return true
or consistently return
false
, provided no information used in
equals
comparisons on the object is modified.
x
,
x.equals(null)
should return false
.
The equals method for class Object
implements
the most discriminating possible equivalence relation on objects;
that is, for any reference values x
and y
,
this method returns true
if and only if x
and
y
refer to the same object (x==y
has the
value true
).
equals
in class Object
other
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.Boolean.hashCode()
,
Hashtable
public boolean isHosted()
public boolean isReplacementConstructor()
public boolean isInterpreterInvoked()
public boolean isForceInlined()
public boolean isAllowInlined()
public boolean isNotInlined()
public boolean isNativeDueToPragma()
public boolean isNative()
public boolean isAbstract()
public boolean isSynchronized()
public boolean isConstructor()
public boolean isDefaultConstructor()
public boolean isClassInitializer()
public Klass getReturnType()
public Klass[] getParameterTypes()
public int getParameterCount()
public boolean requiresClassClinit()
public int getParametersSize()
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
public final void invoke(Object[] args)
|
" 2013 FRC Java API " |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |