public static class MethodEditor.Visitor extends IInstruction.Visitor
Constructor and Description |
---|
Visitor() |
Modifier and Type | Method and Description |
---|---|
void |
addInstructionExceptionHandler(String catchClass,
MethodEditor.Patch p)
Add an exception handler to the current instruction.
|
int |
getIndex() |
void |
insertAfter(MethodEditor.Patch p)
Insert a patch after the current instruction in the code.
|
void |
insertBefore(MethodEditor.Patch p)
Insert a patch before the current instruction in the code.
|
void |
replaceWith(MethodEditor.Patch p)
Replace the current instruction in the code with a patch.
|
void |
setIndex(MethodEditor e,
int i)
Set the current editor and instruction index for this visitor.
|
visitArrayLength, visitArrayLoad, visitArrayStore, visitBinaryOp, visitCheckCast, visitComparison, visitConditionalBranch, visitConstant, visitConversion, visitDup, visitGet, visitGoto, visitInstanceof, visitInvoke, visitLoadIndirect, visitLocalLoad, visitLocalStore, visitMonitor, visitNew, visitPop, visitPut, visitReturn, visitShift, visitStoreIndirect, visitSwap, visitSwitch, visitThrow, visitUnaryOp
public final void setIndex(MethodEditor e, int i)
public final int getIndex()
public final void insertAfter(MethodEditor.Patch p)
public final void insertBefore(MethodEditor.Patch p)
public final void replaceWith(MethodEditor.Patch p)
public final void addInstructionExceptionHandler(String catchClass, MethodEditor.Patch p)
catchClass
- the JVM type for the exception to be caught (e.g., Ljava.io.IOException;), or null to catch all exceptionsp
- the code to handle the exception