Package net.bytebuddy.implementation
Class MethodDelegation.ImplementationDelegate.ForConstruction
java.lang.Object
net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate.ForConstruction
- All Implemented Interfaces:
InstrumentedType.Prepareable
,MethodDelegation.ImplementationDelegate
- Enclosing interface:
MethodDelegation.ImplementationDelegate
@Enhance
public static class MethodDelegation.ImplementationDelegate.ForConstruction
extends Object
implements MethodDelegation.ImplementationDelegate
An implementation delegate for constructing an instance.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate
MethodDelegation.ImplementationDelegate.Compiled, MethodDelegation.ImplementationDelegate.ForConstruction, MethodDelegation.ImplementationDelegate.ForField, MethodDelegation.ImplementationDelegate.ForMethodReturn, MethodDelegation.ImplementationDelegate.ForStaticMethod
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<MethodDelegationBinder.Record> The precompiled delegation records.private final TypeDescription
The type being constructed.Fields inherited from interface net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate
FIELD_NAME_PREFIX
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForConstruction
(TypeDescription typeDescription, List<MethodDelegationBinder.Record> records) Creates an implementation delegate for constructing a new instance. -
Method Summary
Modifier and TypeMethodDescriptioncompile
(TypeDescription instrumentedType) Compiles this implementation delegate.protected static MethodDelegation.ImplementationDelegate
of
(TypeDescription typeDescription, MethodList<?> methods, MethodDelegationBinder methodDelegationBinder) Creates an implementation delegate for constructing a new instance.prepare
(InstrumentedType instrumentedType) Prepares a given instrumented type.
-
Field Details
-
typeDescription
The type being constructed. -
records
The precompiled delegation records.
-
-
Constructor Details
-
ForConstruction
protected ForConstruction(TypeDescription typeDescription, List<MethodDelegationBinder.Record> records) Creates an implementation delegate for constructing a new instance.- Parameters:
typeDescription
- The type being constructed.records
- The precompiled delegation records.
-
-
Method Details
-
of
protected static MethodDelegation.ImplementationDelegate of(TypeDescription typeDescription, MethodList<?> methods, MethodDelegationBinder methodDelegationBinder) Creates an implementation delegate for constructing a new instance.- Parameters:
typeDescription
- The type being constructed.methods
- The constructors to consider.methodDelegationBinder
- The method delegation binder to use.- Returns:
- An appropriate implementation delegate.
-
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.
-
compile
Compiles this implementation delegate.- Specified by:
compile
in interfaceMethodDelegation.ImplementationDelegate
- Parameters:
instrumentedType
- The instrumented type.- Returns:
- A compiled implementation delegate.
-