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.
Note that the combination of two implementation might break the contract for implementingObject.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 ByteCodeAppenderappender(Implementation.Target implementationTarget)Creates a byte code appender that determines the implementation of the instrumented type's methods.InstrumentedTypeprepare(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.PrepareablePrepares a given instrumented type.- Specified by:
preparein 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:ImplementationCreates a byte code appender that determines the implementation of the instrumented type's methods.- Specified by:
appenderin 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).
-
-