public interface Instrumentation
LoadedTypeInitializer
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.
|
static class |
Instrumentation.Simple
A simple implementation of an instrumentation that does not register any members with the instrumented type.
|
static interface |
Instrumentation.SpecialMethodInvocation
Represents an type-specific method invocation on the current instrumented type which is not legal from outside
the type such as a super method or default method invocation.
|
static interface |
Instrumentation.Target
The target of an instrumentation.
|
Modifier and Type | Method and Description |
---|---|
ByteCodeAppender |
appender(Instrumentation.Target instrumentationTarget)
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.Instrumentation.Target)
call. On this method call, loaded type initializers can also be added to the instrumented type.instrumentedType
- The instrumented type that is the basis of the ongoing instrumentation.ByteCodeAppender appender(Instrumentation.Target instrumentationTarget)
instrumentationTarget
- The target of the current instrumentation.prepare(net.bytebuddy.instrumentation.type.InstrumentedType)
.Copyright © 2014–2015. All rights reserved.