Package org.jboss.byteman.agent.adapter
Class ExitCheckAdapter.ExitCheckMethodAdapter
java.lang.Object
org.objectweb.asm.MethodVisitor
org.jboss.byteman.agent.adapter.RuleMethodAdapter
org.jboss.byteman.agent.adapter.RuleCheckMethodAdapter
org.jboss.byteman.agent.adapter.ExitCheckAdapter.ExitCheckMethodAdapter
- Enclosing class:
ExitCheckAdapter
a method visitor used to add a rule event trigger call to a method
-
Nested Class Summary
Nested classes/interfaces inherited from class org.jboss.byteman.agent.adapter.RuleMethodAdapter
RuleMethodAdapter.LocalVar
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private String
private Vector
<org.objectweb.asm.Label> private String[]
private boolean
private String
private String
private Vector
<org.objectweb.asm.Label> Fields inherited from class org.jboss.byteman.agent.adapter.RuleMethodAdapter
localVarsByName, rule, transformContext
Fields inherited from class org.objectweb.asm.MethodVisitor
api, mv
-
Constructor Summary
ConstructorsConstructorDescriptionExitCheckMethodAdapter
(org.objectweb.asm.MethodVisitor mv, TransformContext transformContext, int access, String name, String descriptor, String signature, String[] exceptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
visitInsn
(int opcode) we need to identify return instructions which are inserted because of other rulesvoid
visitLabel
(org.objectweb.asm.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 codevoid
visitTryCatchBlock
(org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, 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.Methods inherited from class org.jboss.byteman.agent.adapter.RuleCheckMethodAdapter
checkBindings, getNewTypeParamDescriptor, getReturnBindingType, isTriggerPoint, setTriggerPoint, visitEnd
Methods inherited from class org.jboss.byteman.agent.adapter.RuleMethodAdapter
getTriggerClassName, lookup, visitLocalVariable
Methods inherited from class org.objectweb.asm.MethodVisitor
getDelegate, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitFieldInsn, visitFrame, visitIincInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitJumpInsn, visitLdcInsn, visitLineNumber, visitLocalVariableAnnotation, visitLookupSwitchInsn, visitMaxs, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTableSwitchInsn, visitTryCatchAnnotation, visitTypeAnnotation, visitTypeInsn, visitVarInsn
-
Field Details
-
access
private int access -
name
-
descriptor
-
signature
-
exceptions
-
startLabels
-
endLabels
-
inhibit
private boolean inhibit
-
-
Constructor Details
-
ExitCheckMethodAdapter
ExitCheckMethodAdapter(org.objectweb.asm.MethodVisitor mv, TransformContext transformContext, int access, String name, String descriptor, String signature, String[] exceptions)
-
-
Method Details
-
visitTryCatchBlock
public void visitTryCatchBlock(org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, 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.- Overrides:
visitTryCatchBlock
in classorg.objectweb.asm.MethodVisitor
- Parameters:
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).- Throws:
IllegalArgumentException
- if one of the labels has already been visited by this visitor (by thevisitLabel
method).
-
visitLabel
public void visitLabel(org.objectweb.asm.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- Overrides:
visitLabel
in classorg.objectweb.asm.MethodVisitor
- Parameters:
label
-
-
visitInsn
public void visitInsn(int opcode) we need to identify return instructions which are inserted because of other rules- Overrides:
visitInsn
in classorg.objectweb.asm.MethodVisitor
- Parameters:
opcode
-
-