public interface ByteCodeAppender
MethodVisitor
.
The
ByteCodeAppender
is not allowed to write
annotations to the method or call the MethodVisitor.visitCode()
,
MethodVisitor.visitMaxs(int, int)
or MethodVisitor.visitEnd()
methods which is both done by the entity delegating the call to the ByteCodeAppender
. This is done in order
to allow for the concatenation of several byte code appenders and therefore a more modular description of method
implementations.Modifier and Type | Interface and Description |
---|---|
static class |
ByteCodeAppender.Compound
A compound appender that combines a given number of other byte code appenders.
|
static class |
ByteCodeAppender.Simple
A simple byte code appender that only represents a given array of
StackManipulation s. |
static class |
ByteCodeAppender.Size
An immutable description of both the operand stack size and the size of the local variable array that is
required to run the code generated by this
ByteCodeAppender . |
Modifier and Type | Method and Description |
---|---|
ByteCodeAppender.Size |
apply(MethodVisitor methodVisitor,
Implementation.Context implementationContext,
MethodDescription instrumentedMethod)
Applies this byte code appender to a type creation process.
|
ByteCodeAppender.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod)
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.Copyright © 2014–2025. All rights reserved.