Class Advice.Appender
java.lang.Object
net.bytebuddy.asm.Advice.Appender
- All Implemented Interfaces:
ByteCodeAppender
- Enclosing class:
Advice
A byte code appender for implementing
Advice.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA method visitor that allows for the emulation of a full method visitor invocation circle without delegating initial and ending visitations to the underlying visitor.Nested classes/interfaces inherited from interface ByteCodeAppender
ByteCodeAppender.Compound, ByteCodeAppender.Simple, ByteCodeAppender.Size -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AdviceThe advice to implement.private final ByteCodeAppenderThe delegate byte code appender.private final Implementation.TargetThe current implementation target. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAppender(Advice advice, Implementation.Target implementationTarget, ByteCodeAppender delegate) Creates a new appender for an advice component. -
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
-
advice
The advice to implement. -
implementationTarget
The current implementation target. -
delegate
The delegate byte code appender.
-
-
Constructor Details
-
Appender
protected Appender(Advice advice, Implementation.Target implementationTarget, ByteCodeAppender delegate) Creates a new appender for an advice component.- Parameters:
advice- The advice to implement.implementationTarget- The current implementation target.delegate- The delegate byte code appender.
-
-
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:
applyin 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.
-