protected class Advice.Dispatcher.Active.Resolved.CodeCopier extends ClassVisitor implements Advice.Dispatcher.Bound
Modifier and Type | Class and Description |
---|---|
protected class |
Advice.Dispatcher.Active.Resolved.CodeCopier.ExceptionTabelSubstitutor
A label substitutor allows to visit an advice method a second time after the exception handlers were already written.
|
protected class |
Advice.Dispatcher.Active.Resolved.CodeCopier.ExceptionTableCollector
A visitor that only writes try-catch-finally blocks to the supplied method visitor.
|
protected class |
Advice.Dispatcher.Active.Resolved.CodeCopier.ExceptionTableExtractor
A class visitor that extracts the exception tables of the advice method.
|
api, cv
Modifier | Constructor and Description |
---|---|
protected |
CodeCopier(MethodDescription.InDefinedShape instrumentedMethod,
MethodVisitor methodVisitor,
Advice.MetaDataHandler.ForInstrumentedMethod metaDataHandler,
Advice.Dispatcher.Active.SuppressionHandler.Bound suppressionHandler,
ClassReader classReader)
Creates a new code copier.
|
Modifier and Type | Method and Description |
---|---|
void |
apply()
Writes the advice method's code.
|
void |
prepare()
Prepares the advice method's exception handlers.
|
String |
toString() |
MethodVisitor |
visitMethod(int modifiers,
String internalName,
String descriptor,
String signature,
String[] exception) |
visit, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitOuterClass, visitSource, visitTypeAnnotation
protected CodeCopier(MethodDescription.InDefinedShape instrumentedMethod, MethodVisitor methodVisitor, Advice.MetaDataHandler.ForInstrumentedMethod metaDataHandler, Advice.Dispatcher.Active.SuppressionHandler.Bound suppressionHandler, ClassReader classReader)
instrumentedMethod
- The instrumented method.methodVisitor
- The method visitor for writing the instrumented method.metaDataHandler
- A meta data handler for writing to the instrumented method.suppressionHandler
- A bound suppression handler that is used for suppressing exceptions of this advice method.classReader
- A class reader for parsing the class file containing the represented advice method.public void prepare()
Advice.Dispatcher.Bound
prepare
in interface Advice.Dispatcher.Bound
public void apply()
Advice.Dispatcher.Bound
apply
in interface Advice.Dispatcher.Bound
public MethodVisitor visitMethod(int modifiers, String internalName, String descriptor, String signature, String[] exception)
visitMethod
in class ClassVisitor
Copyright © 2014–2016. All rights reserved.