Package net.bytebuddy.implementation
Class Implementation.Simple
- java.lang.Object
-
- net.bytebuddy.implementation.Implementation.Simple
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
- Enclosing interface:
- Implementation
@Enhance public static class Implementation.Simple extends java.lang.Object implements Implementation
A simple implementation that does not register any members with the instrumented type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.Implementation
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
-
-
Field Summary
Fields Modifier and Type Field Description private ByteCodeAppender
byteCodeAppender
The byte code appender to emmit.
-
Constructor Summary
Constructors Constructor Description Simple(ByteCodeAppender... byteCodeAppender)
Creates a new simple implementation for the given byte code appenders.Simple(StackManipulation... stackManipulation)
Creates a new simple instrumentation for the given stack manipulations which are summarized in a byte code appender that defines any requested method by these manipulations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteCodeAppender
appender(Implementation.Target implementationTarget)
Creates a byte code appender that determines the implementation of the instrumented type's methods.InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
-
-
-
Field Detail
-
byteCodeAppender
private final ByteCodeAppender byteCodeAppender
The byte code appender to emmit.
-
-
Constructor Detail
-
Simple
public Simple(ByteCodeAppender... byteCodeAppender)
Creates a new simple implementation for the given byte code appenders.- Parameters:
byteCodeAppender
- The byte code appenders to apply in their order of application.
-
Simple
public Simple(StackManipulation... stackManipulation)
Creates a new simple instrumentation for the given stack manipulations which are summarized in a byte code appender that defines any requested method by these manipulations.- Parameters:
stackManipulation
- The stack manipulation to apply in their order of application.
-
-
Method Detail
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Specified by:
prepare
in interfaceInstrumentedType.Prepareable
- Parameters:
instrumentedType
- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
appender
public ByteCodeAppender appender(Implementation.Target implementationTarget)
Creates a byte code appender that determines the implementation of the instrumented type's methods.- Specified by:
appender
in interfaceImplementation
- Parameters:
implementationTarget
- The target of the current implementation.- Returns:
- A byte code appender for implementing methods delegated to this implementation. This byte code appender
is also responsible for handling methods that were added by this implementation on the call to
InstrumentedType.Prepareable.prepare(InstrumentedType)
.
-
-