|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object serp.bytecode.Attributes serp.bytecode.Annotated serp.bytecode.BCMember serp.bytecode.BCMethod
public class BCMethod
A method of a class.
Method Summary | |
---|---|
void |
acceptVisit(BCVisitor visit)
Accept a visit from a BCVisitor , calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one. |
void |
addParam(BCClass type)
Add a parameter type to this method. |
void |
addParam(Class type)
Add a parameter type to this method. |
void |
addParam(int pos,
BCClass type)
Add a parameter type to this method. |
void |
addParam(int pos,
Class type)
Add a parameter type to this method. |
void |
addParam(int pos,
String type)
Add a parameter type to this method. |
void |
addParam(String type)
Add a parameter type to this method. |
void |
clearParams()
Clear all parameters from this method. |
Code |
getCode(boolean add)
Return the code for the method. |
Exceptions |
getExceptions(boolean add)
Return the checked exceptions information for the method. |
BCClass[] |
getParamBCs()
Return the bytecode for all the parameter types for this method. |
String[] |
getParamNames()
Return the names of all the parameter types for this method. |
Class[] |
getParamTypes()
Return the Class objects for all the parameter types for this
method. |
BCClass |
getReturnBC()
Return the bytecode for the return type of this method. |
String |
getReturnName()
Return the name of the type returned by this method. |
Class |
getReturnType()
Return the Class object for the return type of this method. |
boolean |
isAbstract()
Manipulate the method access flags. |
boolean |
isBridge()
Manipulate the method access flags. |
boolean |
isNative()
Manipulate the method access flags. |
boolean |
isStrict()
Manipulate the method access flags. |
boolean |
isSynchronized()
Manipulate the method access flags. |
boolean |
isVarArgs()
Manipulate the method access flags. |
boolean |
removeCode()
Remove the code attribute from the method. |
boolean |
removeExceptions()
Remove the exceptions attribute for the method. |
void |
removeParam(int pos)
Remove a parameter from this method. |
void |
setAbstract(boolean on)
Manipulate the method access flags. |
void |
setBridge(boolean on)
Manipulate the method access flags. |
void |
setNative(boolean on)
Manipulate the method access flags. |
void |
setParam(int pos,
BCClass type)
Change a parameter type of this method. |
void |
setParam(int pos,
Class type)
Change a parameter type of this method. |
void |
setParam(int pos,
String type)
Change a parameter type of this method. |
void |
setParams(BCClass[] types)
Set the parameter type of this method. |
void |
setParams(Class[] types)
Set the parameter type of this method. |
void |
setParams(String[] names)
Set the parameter types of this method. |
void |
setReturn(BCClass type)
Set the return type of this method. |
void |
setReturn(Class type)
Set the return type of this method. |
void |
setReturn(String name)
Set the return type of this method. |
void |
setStrict(boolean on)
Manipulate the method access flags. |
void |
setSynchronized(boolean on)
Manipulate the method access flags. |
void |
setVarArgs(boolean on)
Manipulate the method access flags. |
Methods inherited from class serp.bytecode.BCMember |
---|
getAccessFlags, getClassLoader, getDeclarer, getDescriptor, getDescriptorIndex, getName, getNameIndex, getPool, getProject, isDeprecated, isFinal, isPackage, isPrivate, isProtected, isPublic, isStatic, isSynthetic, isValid, makePackage, makePrivate, makeProtected, makePublic, setAccessFlags, setDeprecated, setDescriptor, setDescriptorIndex, setFinal, setName, setNameIndex, setStatic, setSynthetic |
Methods inherited from class serp.bytecode.Annotated |
---|
getDeclaredAnnotations, getDeclaredRuntimeAnnotations, removeDeclaredAnnotations, removeDeclaredRuntimeAnnotations |
Methods inherited from class serp.bytecode.Attributes |
---|
addAttribute, addAttribute, clearAttributes, getAttribute, getAttributes, getAttributes, removeAttribute, removeAttribute, setAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean isSynchronized()
public void setSynchronized(boolean on)
public boolean isNative()
public void setNative(boolean on)
public boolean isAbstract()
public void setAbstract(boolean on)
public boolean isStrict()
public void setStrict(boolean on)
public boolean isVarArgs()
public void setVarArgs(boolean on)
public boolean isBridge()
public void setBridge(boolean on)
public String getReturnName()
Class.forName(java.lang.String)
call.
BCMember.getDescriptor()
public Class getReturnType()
Class
object for the return type of this method.
BCMember.getDescriptor()
public BCClass getReturnBC()
BCMember.getDescriptor()
public void setReturn(String name)
public void setReturn(Class type)
public void setReturn(BCClass type)
public String[] getParamNames()
Class.forName(java.lang.String)
call.
BCMember.getDescriptor()
public Class[] getParamTypes()
Class
objects for all the parameter types for this
method.
BCMember.getDescriptor()
public BCClass[] getParamBCs()
BCMember.getDescriptor()
public void setParams(String[] names)
BCMember.setDescriptor(java.lang.String)
public void setParams(Class[] types)
BCMember.setDescriptor(java.lang.String)
public void setParams(BCClass[] types)
BCMember.setDescriptor(java.lang.String)
public void addParam(String type)
public void addParam(Class type)
public void addParam(BCClass type)
public void addParam(int pos, String type)
List.add(int,Object)
public void addParam(int pos, Class type)
List.add(int,Object)
public void addParam(int pos, BCClass type)
List.add(int,Object)
public void setParam(int pos, String type)
List.set(int,Object)
public void setParam(int pos, Class type)
List.set(int,Object)
public void setParam(int pos, BCClass type)
List.set(int,Object)
public void clearParams()
public void removeParam(int pos)
public Exceptions getExceptions(boolean add)
Attributes
interface.
add
- if true, a new exceptions attribute will be added
if not already present
add
param is set to falsepublic boolean removeExceptions()
Attributes
interface.
public Code getCode(boolean add)
Attributes
interface.
add
- if true, a new code attribute will be added
if not already present
add
param is set to falsepublic boolean removeCode()
Attributes
interface.
public void acceptVisit(BCVisitor visit)
VisitAcceptor
BCVisitor
, calling the appropriate methods
to notify the visitor that it has entered this entity, and
to provide it with the proper callbacks for each sub-entity owned
by this one.
acceptVisit
in interface VisitAcceptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |