Package net.bytebuddy.asm
Class Advice.Dispatcher.Inlining.Resolved
java.lang.Object
net.bytebuddy.asm.Advice.Dispatcher.Resolved.AbstractBase
net.bytebuddy.asm.Advice.Dispatcher.Inlining.Resolved
- All Implemented Interfaces:
Advice.Dispatcher
,Advice.Dispatcher.Resolved
- Direct Known Subclasses:
Advice.Dispatcher.Inlining.Resolved.ForMethodEnter
,Advice.Dispatcher.Inlining.Resolved.ForMethodExit
- Enclosing class:
- Advice.Dispatcher.Inlining
protected abstract static class Advice.Dispatcher.Inlining.Resolved
extends Advice.Dispatcher.Resolved.AbstractBase
A resolved version of a dispatcher.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
A bound advice method that copies the code by first extracting the exception table and later appending the code of the method without copying any meta data.protected static class
A resolved dispatcher for implementing method enter advice.protected static class
A resolved dispatcher for implementing method exit advice.Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.Dispatcher
Advice.Dispatcher.Bound, Advice.Dispatcher.Delegating, Advice.Dispatcher.Inactive, Advice.Dispatcher.Inlining, Advice.Dispatcher.RelocationHandler, Advice.Dispatcher.Resolved, Advice.Dispatcher.SuppressionHandler, Advice.Dispatcher.Unresolved
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.Dispatcher.Resolved
Advice.Dispatcher.Resolved.AbstractBase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.objectweb.asm.ClassReader
A class reader to query for the class file of the advice method.Fields inherited from class net.bytebuddy.asm.Advice.Dispatcher.Resolved.AbstractBase
adviceMethod, offsetMappings, postProcessor, relocationHandler, suppressionHandler
Fields inherited from interface net.bytebuddy.asm.Advice.Dispatcher
IGNORE_ANNOTATION, IGNORE_METHOD
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Resolved
(MethodDescription.InDefinedShape adviceMethod, Advice.PostProcessor postProcessor, List<? extends Advice.OffsetMapping.Factory<?>> factories, TypeDescription throwableType, TypeDescription relocatableType, org.objectweb.asm.ClassReader classReader) Creates a new resolved version of a dispatcher. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract org.objectweb.asm.MethodVisitor
apply
(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Assigner assigner, Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler, Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler, Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler, TypeDescription instrumentedType, MethodDescription instrumentedMethod, Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler, Advice.Dispatcher.RelocationHandler.Bound relocationHandler, StackManipulation exceptionHandler) Applies a resolution for a given instrumented method.protected abstract Map<Integer,
TypeDefinition> resolveInitializationTypes
(Advice.ArgumentHandler argumentHandler) Resolves the initialization types of this advice method.Methods inherited from class net.bytebuddy.asm.Advice.Dispatcher.Resolved.AbstractBase
isAlive
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.bytebuddy.asm.Advice.Dispatcher
getAdviceType
Methods inherited from interface net.bytebuddy.asm.Advice.Dispatcher.Resolved
bind, getNamedTypes
-
Field Details
-
classReader
protected final org.objectweb.asm.ClassReader classReaderA class reader to query for the class file of the advice method.
-
-
Constructor Details
-
Resolved
protected Resolved(MethodDescription.InDefinedShape adviceMethod, Advice.PostProcessor postProcessor, List<? extends Advice.OffsetMapping.Factory<?>> factories, TypeDescription throwableType, TypeDescription relocatableType, org.objectweb.asm.ClassReader classReader) Creates a new resolved version of a dispatcher.- Parameters:
adviceMethod
- The represented advice method.postProcessor
- The post processor to apply.factories
- A list of factories to resolve for the parameters of the advice method.throwableType
- The type to handle by a suppression handler orAdvice.NoExceptionHandler
to not handle any exceptions.relocatableType
- The type to trigger a relocation of the method's control flow orvoid
if no relocation should be executed.classReader
- A class reader to query for the class file of the advice method.
-
-
Method Details
-
resolveInitializationTypes
protected abstract Map<Integer,TypeDefinition> resolveInitializationTypes(Advice.ArgumentHandler argumentHandler) Resolves the initialization types of this advice method.- Parameters:
argumentHandler
- The argument handler to use for resolving the initialization.- Returns:
- A mapping of parameter offsets to the type to initialize.
-
apply
protected abstract org.objectweb.asm.MethodVisitor apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Assigner assigner, Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler, Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler, Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler, TypeDescription instrumentedType, MethodDescription instrumentedMethod, Advice.Dispatcher.SuppressionHandler.Bound suppressionHandler, Advice.Dispatcher.RelocationHandler.Bound relocationHandler, StackManipulation exceptionHandler) Applies a resolution for a given instrumented method.- Parameters:
methodVisitor
- A method visitor for writing byte code to 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.instrumentedType
- A description of the instrumented type.instrumentedMethod
- A description of the instrumented method.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.- Returns:
- A method visitor for visiting the advice method's byte code.
-