|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tapestry.enhance.MethodFabricator
Wrapper around MethodGen
used to
simplify the creation of new methods within a new class.
Method Summary | |
int |
addArgument(org.apache.bcel.generic.Type type,
String name)
Adds an argument to the method. |
void |
addExceptionHandler(org.apache.bcel.generic.InstructionHandle start,
org.apache.bcel.generic.InstructionHandle end,
org.apache.bcel.generic.InstructionHandle handler,
org.apache.bcel.generic.ObjectType catchType)
Adds an exception handler. |
int |
addLocalVariable(org.apache.bcel.generic.Type type,
String name)
Adds a local variable of the given type, returning its index. |
org.apache.bcel.generic.InstructionHandle |
append(org.apache.bcel.generic.BranchInstruction instruction)
Convienience method for adding instructions. |
org.apache.bcel.generic.InstructionHandle |
append(org.apache.bcel.generic.CompoundInstruction instruction)
Convienience method for adding instructions. |
org.apache.bcel.generic.InstructionHandle |
append(org.apache.bcel.generic.Instruction instruction)
Convienience method for adding instructions. |
void |
commit()
Commits the method; this is invoked last. |
org.apache.bcel.generic.InstructionList |
getInstructionList()
Returns the instruction list for the method being created. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public int addArgument(org.apache.bcel.generic.Type type, String name)
All arguments must be added before any local variables are added.
IllegalStateException
- if arguments may not be added.public int addLocalVariable(org.apache.bcel.generic.Type type, String name)
public org.apache.bcel.generic.InstructionList getInstructionList()
public org.apache.bcel.generic.InstructionHandle append(org.apache.bcel.generic.Instruction instruction)
public org.apache.bcel.generic.InstructionHandle append(org.apache.bcel.generic.CompoundInstruction instruction)
public org.apache.bcel.generic.InstructionHandle append(org.apache.bcel.generic.BranchInstruction instruction)
public void commit()
MethodGen
with
any arguments that have been added, then
creates the Method
object and adds it to the ClassGen
.
public void addExceptionHandler(org.apache.bcel.generic.InstructionHandle start, org.apache.bcel.generic.InstructionHandle end, org.apache.bcel.generic.InstructionHandle handler, org.apache.bcel.generic.ObjectType catchType)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |