Package net.bytebuddy.implementation
Class Implementation.Compound
java.lang.Object
net.bytebuddy.implementation.Implementation.Compound
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
- Enclosing interface:
- Implementation
A compound implementation that allows to combine several implementations.
Note that the combination of two implementation might break the contract for implementing
Object.equals(Object)
and Object.hashCode()
as described for
Implementation
.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
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
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<Implementation>
All implementation that are represented by this compound implementation. -
Constructor Summary
ConstructorsConstructorDescriptionCompound
(List<? extends Implementation> implementations) Creates a new immutable compound implementation.Compound
(Implementation... implementation) Creates a new immutable compound implementation. -
Method Summary
Modifier and TypeMethodDescriptionappender
(Implementation.Target implementationTarget) Creates a byte code appender that determines the implementation of the instrumented type's methods.prepare
(InstrumentedType instrumentedType) Prepares a given instrumented type.
-
Field Details
-
implementations
All implementation that are represented by this compound implementation.
-
-
Constructor Details
-
Compound
Creates a new immutable compound implementation.- Parameters:
implementation
- The implementations to combine in their order.
-
Compound
Creates a new immutable compound implementation.- Parameters:
implementations
- The implementations to combine in their order.
-
-
Method Details
-
prepare
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
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)
.
-