Package net.bytebuddy.implementation
Class MethodDelegation.Appender
java.lang.Object
net.bytebuddy.implementation.MethodDelegation.Appender
- All Implemented Interfaces:
ByteCodeAppender
- Enclosing class:
MethodDelegation
@Enhance
protected static class MethodDelegation.Appender
extends Object
implements ByteCodeAppender
The appender for implementing a
MethodDelegation
.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.ByteCodeAppender
ByteCodeAppender.Compound, ByteCodeAppender.Simple, ByteCodeAppender.Size
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Assigner
The assigner to use.private final MethodDelegation.ImplementationDelegate.Compiled
The compiled implementation delegate.private final Implementation.Target
The implementation target of this implementation.private final MethodDelegationBinder.Record
The method delegation binder processor which is responsible for implementing the method delegation.private final MethodDelegationBinder.TerminationHandler
A termination handler for a method delegation binder. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Appender
(Implementation.Target implementationTarget, MethodDelegationBinder.Record processor, MethodDelegationBinder.TerminationHandler terminationHandler, Assigner assigner, MethodDelegation.ImplementationDelegate.Compiled compiled) Creates a new appender for a method delegation. -
Method Summary
Modifier and TypeMethodDescriptionapply
(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod) Applies this byte code appender to a type creation process.
-
Field Details
-
implementationTarget
The implementation target of this implementation. -
processor
The method delegation binder processor which is responsible for implementing the method delegation. -
terminationHandler
A termination handler for a method delegation binder. -
assigner
The assigner to use. -
compiled
The compiled implementation delegate.
-
-
Constructor Details
-
Appender
protected Appender(Implementation.Target implementationTarget, MethodDelegationBinder.Record processor, MethodDelegationBinder.TerminationHandler terminationHandler, Assigner assigner, MethodDelegation.ImplementationDelegate.Compiled compiled) Creates a new appender for a method delegation.- Parameters:
implementationTarget
- The implementation target of this implementation.processor
- The method delegation binder processor which is responsible for implementing the method delegation.terminationHandler
- A termination handler for a method delegation binder.assigner
- The assigner to use.compiled
- The compiled implementation delegate.
-
-
Method Details
-
apply
public ByteCodeAppender.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod) Applies this byte code appender to a type creation process.- Specified by:
apply
in interfaceByteCodeAppender
- Parameters:
methodVisitor
- The method visitor to which the byte code appender writes its code to.implementationContext
- The implementation context of the current type creation process.instrumentedMethod
- The method that is the target of the instrumentation.- Returns:
- The required size for the applied byte code to run.
-