|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.ClassFileMember
com.sun.squawk.ClassFileMethod
public final class ClassFileMethod
An instance of ClassFileMethod
encapsulates all the
symbolic information of a method declaration in a class file.
This class is provided for a subsystem (such as the translator) that
loads a class definition from a class file.
Field Summary | |
---|---|
static ClassFileMethod[] |
NO_METHODS
A zero-length array of ClassFileMethod s. |
Constructor Summary | |
---|---|
ClassFileMethod(String name,
int modifiers,
Class returnType,
Class[] parameterTypes,
int pragmas)
Creates a new ClassFileMethod instance. |
Method Summary | |
---|---|
byte[] |
getCode()
Gets the byte array corresponding to the "Code" attribute in the class file. |
Class[] |
getParameterTypes()
Gets the parameter types of this method. |
int |
getPragmas()
Gets the pragmas that apply to the method |
Class |
getReturnType()
Gets the return type of this method. |
boolean |
isAbstract()
Determines if this is a abstract method. |
boolean |
isClinit()
Determines if this method is |
boolean |
isDefaultConstructor()
Determines if this method is |
boolean |
isMain()
Determines if this method is a static void main(String[]). |
boolean |
isNative()
Determines if this is a native method. |
boolean |
isProtected()
Determines if this is a protected method. |
void |
setCode(byte[] code)
Sets the byte array corresponding to the "Code" attribute in the class file. |
Methods inherited from class com.sun.squawk.ClassFileMember |
---|
getFullyQualifiedName, getModifiers, getName, isStatic |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final ClassFileMethod[] NO_METHODS
ClassFileMethod
s.
Constructor Detail |
---|
public ClassFileMethod(String name, int modifiers, Class returnType, Class[] parameterTypes, int pragmas)
ClassFileMethod
instance.
name
- the name of the methodmodifiers
- the modifiers of the methodreturnType
- the return type of the methodparameterTypes
- the parameters types of the methodpragmas
- a mask of values denoting the pragmas
(if any) that apply to the methodMethod Detail |
---|
public byte[] getCode()
public Class[] getParameterTypes()
public int getPragmas()
pragmas
that apply to the method
PragmaException
public Class getReturnType()
public boolean isAbstract()
abstract
method.
abstract
methodpublic boolean isClinit()
public boolean isDefaultConstructor()
public boolean isMain()
public boolean isNative()
native
method.
native
methodpublic boolean isProtected()
protected
method.
protected
methodpublic void setCode(byte[] code)
code
- the data in the "Code" attribute for this method
|
2010 FRC Java API |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |