public interface Instrumentation
TypeInitializer
s can be registered for an instrumented
type.An instrumentation implementation should provide meaningful implementations
Object.equals(Object)
and Object.hashCode()
if it wants to avoid to be used twice within the creation of a dynamic type. For two
equal instrumentation implementations only one will be applied on the creation of a dynamic type.Modifier and Type | Interface and Description |
---|---|
static class |
Instrumentation.Compound
A compound instrumentation that allows to combine several instrumentations.
|
static interface |
Instrumentation.Context
The context for an instrumentation application.
|
static class |
Instrumentation.ForAbstractMethod
An instrumentation for an abstract method that does not append any code and will throw an exception if it is
attempted to be composed with other methods that do provide an implementation.
|
Modifier and Type | Method and Description |
---|---|
ByteCodeAppender |
appender(TypeDescription instrumentedType)
Creates a byte code appender that determines the implementation of the instrumented type's methods.
|
InstrumentedType |
prepare(InstrumentedType instrumentedType)
During the preparation phase of an instrumentation, implementations are eligible to adding fields or methods
to the currently instrumented type.
|
InstrumentedType prepare(InstrumentedType instrumentedType)
ByteCodeAppender
that is emitted
on the call to
appender(net.bytebuddy.instrumentation.type.TypeDescription)
call. On this method call, type initializers can also be added to the instrumented type.instrumentedType
- The instrumented type that is the basis of the ongoing instrumentation.ByteCodeAppender appender(TypeDescription instrumentedType)
instrumentedType
- The instrumented type that is to be created.prepare(net.bytebuddy.instrumentation.type.InstrumentedType)
.Copyright © 2014. All rights reserved.