Package net.bytebuddy.implementation
Class Implementation.Compound
- java.lang.Object
-
- net.bytebuddy.implementation.Implementation.Compound
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
- Enclosing interface:
- Implementation
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/interfaces inherited from interface net.bytebuddy.implementation.Implementation
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
-
-
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.
-
-
-
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)
Description copied from interface:InstrumentedType.Prepareable
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)
Description copied from interface:Implementation
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)
.
-
-