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,
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, visitTypeAnnotationprotected CodeCopier(MethodDescription.InDefinedShape instrumentedMethod, MethodVisitor methodVisitor, Advice.MetaDataHandler.ForInstrumentedMethod metaDataHandler, 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.classReader - A class reader for parsing the class file containing the represented advice method.public void prepare()
Advice.Dispatcher.Boundprepare in interface Advice.Dispatcher.Boundpublic void apply()
Advice.Dispatcher.Boundapply in interface Advice.Dispatcher.Boundpublic MethodVisitor visitMethod(int modifiers, String internalName, String descriptor, String signature, String[] exception)
visitMethod in class ClassVisitorCopyright © 2014–2016. All rights reserved.