Package net.bytebuddy.asm
Class Advice.Dispatcher.Delegating.Resolved
java.lang.Object
net.bytebuddy.asm.Advice.Dispatcher.Resolved.AbstractBase
net.bytebuddy.asm.Advice.Dispatcher.Delegating.Resolved
- All Implemented Interfaces:
Advice.Dispatcher
,Advice.Dispatcher.Resolved
- Direct Known Subclasses:
Advice.Dispatcher.Delegating.Resolved.ForMethodEnter
,Advice.Dispatcher.Delegating.Resolved.ForMethodExit
- Enclosing class:
Advice.Dispatcher.Delegating
protected abstract static class Advice.Dispatcher.Delegating.Resolved
extends Advice.Dispatcher.Resolved.AbstractBase
A resolved version of a dispatcher.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static 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
FieldsFields inherited from class net.bytebuddy.asm.Advice.Dispatcher.Resolved.AbstractBase
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, int relocatableIndex, Advice.Delegator delegator) Creates a new resolved version of a dispatcher. -
Method Summary
Modifier and TypeMethodDescriptionbind
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Assigner assigner, Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler, Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler, Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler, StackManipulation exceptionHandler, Advice.Dispatcher.RelocationHandler.Relocation relocation) Binds this dispatcher for resolution to a specific method.Returns the named types defined by this advice.protected abstract Advice.Dispatcher.Bound
resolve
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Assigner assigner, Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler, Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler, Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler, StackManipulation exceptionHandler, Advice.Dispatcher.RelocationHandler.Relocation relocation) Binds this dispatcher for resolution to a specific 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
-
Field Details
-
delegator
The delegator to use.
-
-
Constructor Details
-
Resolved
protected Resolved(MethodDescription.InDefinedShape adviceMethod, Advice.PostProcessor postProcessor, List<? extends Advice.OffsetMapping.Factory<?>> factories, TypeDescription throwableType, TypeDescription relocatableType, int relocatableIndex, Advice.Delegator delegator) 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.relocatableIndex
- The index within an array that is returned by the advice method, indicating the value to consider for relocation.delegator
- The delegator to use.
-
-
Method Details
-
getNamedTypes
Returns the named types defined by this advice.- Returns:
- The named types defined by this advice.
-
bind
public Advice.Dispatcher.Bound bind(TypeDescription instrumentedType, MethodDescription instrumentedMethod, org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Assigner assigner, Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler, Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler, Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler, StackManipulation exceptionHandler, Advice.Dispatcher.RelocationHandler.Relocation relocation) Binds this dispatcher for resolution to a specific method.- Parameters:
instrumentedType
- 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.exceptionHandler
- The stack manipulation to apply within a suppression handler.relocation
- A relocation to use with a relocation handler.- Returns:
- A dispatcher that is bound to the instrumented method.
-
resolve
protected abstract Advice.Dispatcher.Bound resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, Assigner assigner, Advice.ArgumentHandler.ForInstrumentedMethod argumentHandler, Advice.MethodSizeHandler.ForInstrumentedMethod methodSizeHandler, Advice.StackMapFrameHandler.ForInstrumentedMethod stackMapFrameHandler, StackManipulation exceptionHandler, Advice.Dispatcher.RelocationHandler.Relocation relocation) Binds this dispatcher for resolution to a specific method.- Parameters:
instrumentedType
- A description of the instrumented type.instrumentedMethod
- The instrumented method that is being bound.methodVisitor
- The method visitor for writing 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.exceptionHandler
- The stack manipulation to apply within a suppression handler.relocation
- A relocation to use with a relocation handler.- Returns:
- An appropriate bound advice dispatcher.
-