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 java.lang.Object implements MethodDelegation.ImplementationDelegate
An implementation delegate for constructing an instance.
-
-
Nested Class Summary
-
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
Fields Modifier and Type Field Description private java.util.List<MethodDelegationBinder.Record>recordsThe precompiled delegation records.private TypeDescriptiontypeDescriptionThe type being constructed.-
Fields inherited from interface net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate
FIELD_NAME_PREFIX
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedForConstruction(TypeDescription typeDescription, java.util.List<MethodDelegationBinder.Record> records)Creates an implementation delegate for constructing a new instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodDelegation.ImplementationDelegate.Compiledcompile(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.InstrumentedTypeprepare(InstrumentedType instrumentedType)Prepares a given instrumented type.
-
-
-
Field Detail
-
typeDescription
private final TypeDescription typeDescription
The type being constructed.
-
records
private final java.util.List<MethodDelegationBinder.Record> records
The precompiled delegation records.
-
-
Constructor Detail
-
ForConstruction
protected ForConstruction(TypeDescription typeDescription, java.util.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 Detail
-
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
public InstrumentedType prepare(InstrumentedType instrumentedType)
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
public MethodDelegation.ImplementationDelegate.Compiled compile(TypeDescription instrumentedType)
Compiles this implementation delegate.- Specified by:
compilein interfaceMethodDelegation.ImplementationDelegate- Parameters:
instrumentedType- The instrumented type.- Returns:
- A compiled implementation delegate.
-
-