|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gnu.bytecode.Method
public class Method
Represents a method in a ClassType
.
A Method
contain a CodeAttr
object;
the interface for generating bytecode instructions is primarily
in CodeAttr
.
All the methods whose name start with compile_
are
deprecated, and should not be used; use the methods
in CodeAttr
instead.
Method Summary | |
---|---|
void |
allocate_local(Variable local)
Deprecated. |
void |
compile_checkcast(Type type)
|
void |
compile_push_this()
|
void |
compile_push_value(Variable var)
Deprecated. |
void |
compile_store_value(Variable var)
Deprecated. |
Attribute |
getAttributes()
Get the (first) Attribute of this container. |
CodeAttr |
getCode()
|
ConstantPool |
getConstants()
|
ClassType |
getDeclaringClass()
|
ExceptionsAttr |
getExceptionAttr()
|
ClassType[] |
getExceptions()
|
int |
getModifiers()
|
java.lang.String |
getName()
|
Method |
getNext()
|
Type[] |
getParameterTypes()
|
Type |
getReturnType()
|
java.lang.String |
getSignature()
|
boolean |
getStaticFlag()
|
void |
init_param_slots()
Deprecated. Use startCode instead |
void |
initCode()
Allocate a Code attribute, and prepare to generate code. |
boolean |
isAbstract()
|
void |
maybe_compile_checkcast(Type type)
|
Scope |
popScope()
|
void |
push_var(Variable var)
Deprecated. |
Scope |
pushScope()
|
boolean |
reachableHere()
True if control could reach here. |
void |
setAttributes(Attribute attributes)
Set the (list of) Attributes of this container. |
void |
setExceptions(ClassType[] exn_types)
|
void |
setExceptions(short[] exn_indices)
|
void |
setModifiers(int modifiers)
|
void |
setName(int name_index)
|
void |
setName(java.lang.String name)
|
void |
setSignature(int signature_index)
|
void |
setSignature(java.lang.String signature)
|
void |
setStaticFlag(boolean is_static)
|
CodeAttr |
startCode()
Recommended method to create a new CodeAttr for this Method. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final Attribute getAttributes()
AttrContainer
getAttributes
in interface AttrContainer
public final void setAttributes(Attribute attributes)
AttrContainer
setAttributes
in interface AttrContainer
public final ExceptionsAttr getExceptionAttr()
public void setExceptions(short[] exn_indices)
public void setExceptions(ClassType[] exn_types)
public final CodeAttr getCode()
public final void setStaticFlag(boolean is_static)
public final boolean getStaticFlag()
public final boolean isAbstract()
public int getModifiers()
public void setModifiers(int modifiers)
public final ConstantPool getConstants()
public Scope pushScope()
public final boolean reachableHere()
public Scope popScope()
public void allocate_local(Variable local)
local
- the variable we need to allocatepublic void initCode()
public void init_param_slots()
public CodeAttr startCode()
public void compile_checkcast(Type type)
public void maybe_compile_checkcast(Type type)
public void push_var(Variable var)
var
- The variable whose contents we want to push.public void compile_push_value(Variable var)
public void compile_store_value(Variable var)
public void compile_push_this()
public java.lang.String getSignature()
public void setSignature(java.lang.String signature)
public void setSignature(int signature_index)
public ClassType getDeclaringClass()
public final Type getReturnType()
public final Type[] getParameterTypes()
public final ClassType[] getExceptions()
public final java.lang.String getName()
public final void setName(java.lang.String name)
public final void setName(int name_index)
public final Method getNext()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |