@HashCodeAndEqualsPlugin.Enhance public static class MethodDelegation.ImplementationDelegate.ForConstruction extends java.lang.Object implements MethodDelegation.ImplementationDelegate
MethodDelegation.ImplementationDelegate.Compiled, MethodDelegation.ImplementationDelegate.ForConstruction, MethodDelegation.ImplementationDelegate.ForField, MethodDelegation.ImplementationDelegate.ForMethodReturn, MethodDelegation.ImplementationDelegate.ForStaticMethod
Modifier and Type | Field and Description |
---|---|
private java.util.List<MethodDelegationBinder.Record> |
records
The precompiled delegation records.
|
private TypeDescription |
typeDescription
The type being constructed.
|
FIELD_NAME_PREFIX
Modifier | Constructor and Description |
---|---|
protected |
ForConstruction(TypeDescription typeDescription,
java.util.List<MethodDelegationBinder.Record> records)
Creates an implementation delegate for constructing a new instance.
|
Modifier and Type | Method and Description |
---|---|
MethodDelegation.ImplementationDelegate.Compiled |
compile(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.
|
InstrumentedType |
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
|
private final TypeDescription typeDescription
private final java.util.List<MethodDelegationBinder.Record> records
protected ForConstruction(TypeDescription typeDescription, java.util.List<MethodDelegationBinder.Record> records)
typeDescription
- The type being constructed.records
- The precompiled delegation records.protected static MethodDelegation.ImplementationDelegate of(TypeDescription typeDescription, MethodList<?> methods, MethodDelegationBinder methodDelegationBinder)
typeDescription
- The type being constructed.methods
- The constructors to consider.methodDelegationBinder
- The method delegation binder to use.public InstrumentedType prepare(InstrumentedType instrumentedType)
prepare
in interface InstrumentedType.Prepareable
instrumentedType
- The instrumented type in its current form.public MethodDelegation.ImplementationDelegate.Compiled compile(TypeDescription instrumentedType)
compile
in interface MethodDelegation.ImplementationDelegate
instrumentedType
- The instrumented type.