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 java.lang.Object implements ByteCodeAppender
The appender for implementing aMethodDelegation
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.ByteCodeAppender
ByteCodeAppender.Compound, ByteCodeAppender.Simple, ByteCodeAppender.Size
-
-
Field Summary
Fields Modifier and Type Field Description private Assigner
assigner
The assigner to use.private MethodDelegation.ImplementationDelegate.Compiled
compiled
The compiled implementation delegate.private Implementation.Target
implementationTarget
The implementation target of this implementation.private MethodDelegationBinder.Record
processor
The method delegation binder processor which is responsible for implementing the method delegation.private MethodDelegationBinder.TerminationHandler
terminationHandler
A termination handler for a method delegation binder.
-
Constructor Summary
Constructors Modifier Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteCodeAppender.Size
apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod)
Applies this byte code appender to a type creation process.
-
-
-
Field Detail
-
implementationTarget
private final Implementation.Target implementationTarget
The implementation target of this implementation.
-
processor
private final MethodDelegationBinder.Record processor
The method delegation binder processor which is responsible for implementing the method delegation.
-
terminationHandler
private final MethodDelegationBinder.TerminationHandler terminationHandler
A termination handler for a method delegation binder.
-
assigner
private final Assigner assigner
The assigner to use.
-
compiled
private final MethodDelegation.ImplementationDelegate.Compiled compiled
The compiled implementation delegate.
-
-
Constructor Detail
-
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 Detail
-
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.
-
-