@HashCodeAndEqualsPlugin.Enhance protected static class MethodCall.TargetHandler.ForValue.Factory extends java.lang.Object implements MethodCall.TargetHandler.Factory
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
FIELD_PREFIX
The name prefix of the field to store the instance.
|
private TypeDescription.Generic |
fieldType
The type of the field.
|
private java.lang.String |
name
The name of the field to store the target.
|
private java.lang.Object |
target
The target on which the method is to be invoked.
|
Modifier | Constructor and Description |
---|---|
protected |
Factory(java.lang.Object target,
TypeDescription.Generic fieldType)
Creates a new target handler for a static field.
|
Modifier and Type | Method and Description |
---|---|
MethodCall.TargetHandler |
make(Implementation.Target implementationTarget)
Creates a target handler for a given implementation target.
|
InstrumentedType |
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
|
private static final java.lang.String FIELD_PREFIX
private final java.lang.Object target
private final TypeDescription.Generic fieldType
@HashCodeAndEqualsPlugin.ValueHandling(value=IGNORE) private final java.lang.String name
protected Factory(java.lang.Object target, TypeDescription.Generic fieldType)
target
- The target on which the method is to be invoked.fieldType
- The type of the field.public InstrumentedType prepare(InstrumentedType instrumentedType)
prepare
in interface InstrumentedType.Prepareable
instrumentedType
- The instrumented type in its current form.public MethodCall.TargetHandler make(Implementation.Target implementationTarget)
make
in interface MethodCall.TargetHandler.Factory
implementationTarget
- The implementation target to use.