|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CodeGenerator
Interface for an object which can produce Java bytecode.
Method Summary | |
---|---|
int |
stackDelta()
Return the change in the stack dept this generator will cause. |
int |
stackDepth()
Return the total depth of the stack required by this CodeGenerator. |
void |
writeCode(CodeContext ctx)
Write the byte or bytes for this CodeGenerator to a CodeContext. |
Method Detail |
---|
void writeCode(CodeContext ctx) throws CodeException
ctx
- a CodeContext to write to
CodeException
- if there was some failure in writing to the contextint stackDepth()
For single byte-code instructions, this will be the same as stackDelta() if stackDelta() is positive, zero otherwise. For a compound instruction, this will be the maximum stack depth required to execute all sub-instructions.
int stackDelta()
In the case of an instruction that adds items to the stack, stackDelta will be positive. For instructions that removes items from the stack, this will be negative.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |