Package net.bytebuddy.implementation
Class Implementation.Compound
- java.lang.Object
-
- net.bytebuddy.implementation.Implementation.Compound
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
- Enclosing interface:
- Implementation
@Enhance public static class Implementation.Compound extends java.lang.Object implements Implementation
A compound implementation that allows to combine several implementations.Object.equals(Object)
andObject.hashCode()
as described forImplementation
.- See Also:
Implementation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Implementation.Compound.Composable
A compound implementation that allows to combine several implementations and that isImplementation.Composable
.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.Implementation
Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Implementation>
implementations
All implementation that are represented by this compound implementation.
-
Constructor Summary
Constructors Constructor Description Compound(java.util.List<? extends Implementation> implementations)
Creates a new immutable compound implementation.Compound(Implementation... implementation)
Creates a new immutable compound implementation.
-
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
-
implementations
private final java.util.List<Implementation> implementations
All implementation that are represented by this compound implementation.
-
-
Constructor Detail
-
Compound
public Compound(Implementation... implementation)
Creates a new immutable compound implementation.- Parameters:
implementation
- The implementations to combine in their order.
-
Compound
public Compound(java.util.List<? extends Implementation> implementations)
Creates a new immutable compound implementation.- Parameters:
implementations
- The implementations to combine in their order.
-
-
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)
.
-
-