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.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 |
---|---|
boolean |
appendsCode()
Determines if this byte code appender offers an (possibly empty) implementation of a method.
|
ByteCodeAppender.Size |
apply(org.objectweb.asm.MethodVisitor methodVisitor,
Instrumentation.Context instrumentationContext,
MethodDescription instrumentedMethod)
Applies this byte code appender to a type creation process.
|
boolean appendsCode()
true
if this byte code appender requires this method to be implemented or false
if this
appender describes an abstract method.ByteCodeAppender.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Instrumentation.Context instrumentationContext, MethodDescription instrumentedMethod)
methodVisitor
- The method visitor to which the byte code appender writes its code to.instrumentationContext
- The instrumentation context of the current type creation process.instrumentedMethod
- The method that is the target of the instrumentation.Copyright © 2014. All rights reserved.