private class ExitCheckAdapter.ExitCheckMethodAdapter extends RuleCheckMethodAdapter
RuleMethodAdapter.LocalVar
Modifier and Type | Field and Description |
---|---|
private int |
access |
private java.lang.String |
descriptor |
private java.util.Vector<Label> |
endLabels |
private java.lang.String[] |
exceptions |
private boolean |
inhibit |
private java.lang.String |
name |
private java.lang.String |
signature |
private java.util.Vector<Label> |
startLabels |
localVarsByName, rule, transformContext
Constructor and Description |
---|
ExitCheckAdapter.ExitCheckMethodAdapter(MethodVisitor mv,
TransformContext transformContext,
int access,
java.lang.String name,
java.lang.String descriptor,
java.lang.String signature,
java.lang.String[] exceptions) |
Modifier and Type | Method and Description |
---|---|
void |
visitEnd() |
void |
visitInsn(int opcode)
we need to identify return instructions which are inserted because of other rules
|
void |
visitLabel(Label label)
each time we visit a label we set or clear flag inhibit depending upon whether the label
identifies an EarlyReturnException block or not in order to avoid inserting triggers
for returns added by our own exception handling code
|
void |
visitTryCatchBlock(Label start,
Label end,
Label handler,
java.lang.String type)
Visits a try catch block and records the label of the handler start if the
exception type EarlyReturnException so we can later avoid inserting a rule
trigger.
|
checkBindings, isTriggerPoint, setTriggerPoint
getTriggerClass, lookup, visitLocalVariable
private int access
private java.lang.String name
private java.lang.String descriptor
private java.lang.String signature
private java.lang.String[] exceptions
private java.util.Vector<Label> startLabels
private java.util.Vector<Label> endLabels
private boolean inhibit
ExitCheckAdapter.ExitCheckMethodAdapter(MethodVisitor mv, TransformContext transformContext, int access, java.lang.String name, java.lang.String descriptor, java.lang.String signature, java.lang.String[] exceptions)
public void visitTryCatchBlock(Label start, Label end, Label handler, java.lang.String type)
start
- beginning of the exception handler's scope (inclusive).end
- end of the exception handler's scope (exclusive).handler
- beginning of the exception handler's code.type
- internal name of the type of exceptions handled by the
handler, or null to catch any exceptions (for "finally"
blocks).java.lang.IllegalArgumentException
- if one of the labels has already been
visited by this visitor (by the visitLabel
method).public void visitLabel(Label label)
label
- public void visitInsn(int opcode)
opcode
- public void visitEnd()