protected class Advice.Dispatcher.Inlining.Resolved.AdviceMethodInliner extends ClassVisitor implements Advice.Dispatcher.Bound
Modifier and Type | Class and Description |
---|---|
protected class |
Advice.Dispatcher.Inlining.Resolved.AdviceMethodInliner.ExceptionTableCollector
A visitor that only writes try-catch-finally blocks to the supplied method visitor.
|
protected class |
Advice.Dispatcher.Inlining.Resolved.AdviceMethodInliner.ExceptionTableExtractor
A class visitor that extracts the exception tables of the advice method.
|
protected class |
Advice.Dispatcher.Inlining.Resolved.AdviceMethodInliner.ExceptionTableSubstitutor
A label substitutor allows to visit an advice method a second time after the exception handlers were already written.
|
Modifier and Type | Field and Description |
---|---|
protected Advice.ArgumentHandler.ForInstrumentedMethod |
argumentHandler
A handler for accessing values on the local variable array.
|
protected Assigner |
assigner
The assigner to use.
|
protected AsmClassReader |
classReader
A class reader for parsing the class file containing the represented advice method.
|
protected StackManipulation |
exceptionHandler
The exception handler that is resolved for the instrumented method.
|
protected Implementation.Context |
implementationContext
The implementation context to use.
|
protected MethodDescription |
instrumentedMethod
The instrumented method.
|
protected TypeDescription |
instrumentedType
A description of the instrumented type.
|
protected List<Label> |
labels
The labels that were found during parsing the method's exception handler in the order of their discovery.
|
protected Advice.MethodSizeHandler.ForInstrumentedMethod |
methodSizeHandler
A handler for computing the method size requirements.
|
protected MethodVisitor |
methodVisitor
The method visitor for writing the instrumented method.
|
protected Advice.Dispatcher.RelocationHandler.Bound |
relocationHandler
A bound relocation handler that is responsible for considering a non-standard control flow.
|
protected Advice.StackMapFrameHandler.ForInstrumentedMethod |
stackMapFrameHandler
A handler for translating and injecting stack map frames.
|
protected Advice.Dispatcher.SuppressionHandler.Bound |
suppressionHandler
A bound suppression handler that is used for suppressing exceptions of this advice method.
|
api, cv
Modifier | Constructor and Description |
---|---|
protected |
AdviceMethodInliner(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
MethodVisitor methodVisitor,
Implementation.Context implementationContext,
Assigner assigner,
Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler,
Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler,
Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler,
Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler,
Advice.Dispatcher.RelocationHandler.Bound relocationHandler,
StackManipulation exceptionHandler,
AsmClassReader classReader)
Creates a new advice method inliner.
|
Modifier and Type | Method and Description |
---|---|
void |
apply()
Applies this dispatcher.
|
void |
initialize()
Initialized the advice's methods local variables.
|
void |
prepare()
Prepares the advice method's exception handlers.
|
MethodVisitor |
visitMethod(int modifiers,
String internalName,
String descriptor,
String signature,
String[] exception) |
getDelegate, visit, visitAnnotation, visitAttribute, visitEnd, visitField, visitInnerClass, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation
protected final TypeDescription instrumentedType
protected final MethodDescription instrumentedMethod
protected final MethodVisitor methodVisitor
protected final Implementation.Context implementationContext
protected final Assigner assigner
protected final Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler
protected final Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler
protected final Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler
protected final Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler
protected final Advice.Dispatcher.RelocationHandler.Bound relocationHandler
protected final StackManipulation exceptionHandler
protected final AsmClassReader classReader
protected AdviceMethodInliner(TypeDescription instrumentedType, MethodDescription instrumentedMethod, MethodVisitor methodVisitor, Implementation.Context implementationContext, Assigner assigner, Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler, Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler, Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler, Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler, Advice.Dispatcher.RelocationHandler.Bound relocationHandler, StackManipulation exceptionHandler, AsmClassReader classReader)
instrumentedType
- A description of the instrumented type.instrumentedMethod
- The instrumented method.methodVisitor
- The method visitor for writing the instrumented method.implementationContext
- The implementation context to use.assigner
- The assigner to use.argumentHandler
- A handler for accessing values on the local variable array.methodSizeHandler
- A handler for computing the method size requirements.stackMapFrameHandler
- A handler for translating and injecting stack map frames.suppressionHandler
- A bound suppression handler that is used for suppressing exceptions of this advice method.relocationHandler
- A bound relocation handler that is responsible for considering a non-standard control flow.exceptionHandler
- The exception handler that is resolved for the instrumented method.classReader
- A class reader for parsing the class file containing the represented advice method.public void prepare()
prepare
in interface Advice.Dispatcher.Bound
public void initialize()
initialize
in interface Advice.Dispatcher.Bound
public void apply()
apply
in interface Advice.Dispatcher.Bound
@MaybeNull public MethodVisitor visitMethod(int modifiers, String internalName, String descriptor, @MaybeNull String signature, @MaybeNull String[] exception)
visitMethod
in class ClassVisitor
Copyright © 2014–2024. All rights reserved.