Package net.bytebuddy.implementation
Class MethodDelegation.ImplementationDelegate.Compiled.ForConstruction
java.lang.Object
net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate.Compiled.ForConstruction
- All Implemented Interfaces:
MethodDelegation.ImplementationDelegate.Compiled
- Enclosing interface:
- MethodDelegation.ImplementationDelegate.Compiled
@Enhance
public static class MethodDelegation.ImplementationDelegate.Compiled.ForConstruction
extends Object
implements MethodDelegation.ImplementationDelegate.Compiled
A compiled implementation delegate for a constructor delegation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate.Compiled
MethodDelegation.ImplementationDelegate.Compiled.ForConstruction, MethodDelegation.ImplementationDelegate.Compiled.ForField, MethodDelegation.ImplementationDelegate.Compiled.ForMethodReturn, MethodDelegation.ImplementationDelegate.Compiled.ForStaticCall
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<MethodDelegationBinder.Record>
The records to consider for delegation.private final TypeDescription
The type to be constructed. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForConstruction
(TypeDescription typeDescription, List<MethodDelegationBinder.Record> records) Creates a new compiled implementation delegate for a constructor delegation. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of binding records to consider for delegation.invoke()
Resolves an invoker to use for invoking the delegation target.prepare
(MethodDescription instrumentedMethod) Resolves a stack manipulation that prepares the delegation invocation.
-
Field Details
-
typeDescription
The type to be constructed. -
records
The records to consider for delegation.
-
-
Constructor Details
-
ForConstruction
protected ForConstruction(TypeDescription typeDescription, List<MethodDelegationBinder.Record> records) Creates a new compiled implementation delegate for a constructor delegation.- Parameters:
typeDescription
- The type to be constructed.records
- The records to consider for delegation.
-
-
Method Details
-
prepare
Resolves a stack manipulation that prepares the delegation invocation.- Specified by:
prepare
in interfaceMethodDelegation.ImplementationDelegate.Compiled
- Parameters:
instrumentedMethod
- The instrumented method.- Returns:
- A stack manipulation that is applied prior to loading arguments and executing the method call.
-
invoke
Resolves an invoker to use for invoking the delegation target.- Specified by:
invoke
in interfaceMethodDelegation.ImplementationDelegate.Compiled
- Returns:
- The method invoker to use.
-
getRecords
Returns a list of binding records to consider for delegation.- Specified by:
getRecords
in interfaceMethodDelegation.ImplementationDelegate.Compiled
- Returns:
- A list of delegation binder records to consider.
-