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.NoOpNested 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 TypeDescriptionThe type being constructed.Fields inherited from interface net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate
FIELD_NAME_PREFIX -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForConstruction(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.ImplementationDelegateof(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:
preparein interfaceInstrumentedType.Prepareable- Parameters:
instrumentedType- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
compile
Compiles this implementation delegate.- Specified by:
compilein interfaceMethodDelegation.ImplementationDelegate- Parameters:
instrumentedType- The instrumented type.- Returns:
- A compiled implementation delegate.
-