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 java.lang.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
Fields Modifier and Type Field Description private java.util.List<MethodDelegationBinder.Record>
records
The records to consider for delegation.private TypeDescription
typeDescription
The type to be constructed.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForConstruction(TypeDescription typeDescription, java.util.List<MethodDelegationBinder.Record> records)
Creates a new compiled implementation delegate for a constructor delegation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<MethodDelegationBinder.Record>
getRecords()
Returns a list of binding records to consider for delegation.MethodDelegationBinder.MethodInvoker
invoke()
Resolves an invoker to use for invoking the delegation target.StackManipulation
prepare(MethodDescription instrumentedMethod)
Resolves a stack manipulation that prepares the delegation invocation.
-
-
-
Field Detail
-
typeDescription
private final TypeDescription typeDescription
The type to be constructed.
-
records
private final java.util.List<MethodDelegationBinder.Record> records
The records to consider for delegation.
-
-
Constructor Detail
-
ForConstruction
protected ForConstruction(TypeDescription typeDescription, java.util.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 Detail
-
prepare
public StackManipulation prepare(MethodDescription instrumentedMethod)
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
public MethodDelegationBinder.MethodInvoker 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
public java.util.List<MethodDelegationBinder.Record> 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.
-
-