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 aMethodDelegation
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.ByteCodeAppender
ByteCodeAppender.Compound, ByteCodeAppender.Simple, ByteCodeAppender.Size
-
-
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.
-
-
-
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.
-
-