Package net.bytebuddy.implementation
Class Implementation.Compound.Composable
- java.lang.Object
-
- net.bytebuddy.implementation.Implementation.Compound.Composable
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
,Implementation.Composable
- Enclosing class:
- Implementation.Compound
@Enhance public static class Implementation.Compound.Composable extends java.lang.Object implements Implementation.Composable
A compound implementation that allows to combine several implementations and that isImplementation.Composable
.Object.equals(Object)
andObject.hashCode()
as described forImplementation
.- See Also:
Implementation
-
-
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 Implementation.Composable
composable
The composable implementation that is applied last.private java.util.List<Implementation>
implementations
All implementation that are represented by this compound implementation.
-
Constructor Summary
Constructors Constructor Description Composable(java.util.List<? extends Implementation> implementations, Implementation.Composable composable)
Creates a new compound composable.Composable(Implementation implementation, Implementation.Composable composable)
Creates a new compound composable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Implementation
andThen(Implementation implementation)
Appends the supplied implementation to this implementation.Implementation.Composable
andThen(Implementation.Composable implementation)
Appends the supplied composable implementation to this implementation.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
-
composable
private final Implementation.Composable composable
The composable implementation that is applied last.
-
implementations
private final java.util.List<Implementation> implementations
All implementation that are represented by this compound implementation.
-
-
Constructor Detail
-
Composable
public Composable(Implementation implementation, Implementation.Composable composable)
Creates a new compound composable.- Parameters:
implementation
- An implementation that is represented by this compound implementation prior to the composable.composable
- The composable implementation that is applied last.
-
Composable
public Composable(java.util.List<? extends Implementation> implementations, Implementation.Composable composable)
Creates a new compound composable.- Parameters:
implementations
- All implementation that are represented by this compound implementation excluding the composable.composable
- The composable implementation that is applied last.
-
-
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)
.
-
andThen
public Implementation andThen(Implementation implementation)
Appends the supplied implementation to this implementation.- Specified by:
andThen
in interfaceImplementation.Composable
- Parameters:
implementation
- The subsequent implementation.- Returns:
- An implementation that combines this implementation with the provided one.
-
andThen
public Implementation.Composable andThen(Implementation.Composable implementation)
Appends the supplied composable implementation to this implementation.- Specified by:
andThen
in interfaceImplementation.Composable
- Parameters:
implementation
- The subsequent composable implementation.- Returns:
- A composable implementation that combines this implementation with the provided one.
-
-