@HashCodeAndEqualsPlugin.Enhance protected static class MethodDelegation.ImplementationDelegate.ForField.WithInstance extends MethodDelegation.ImplementationDelegate.ForField
MethodDelegation.ImplementationDelegate.ForField.WithInstance, MethodDelegation.ImplementationDelegate.ForField.WithLookupMethodDelegation.ImplementationDelegate.Compiled, MethodDelegation.ImplementationDelegate.ForConstruction, MethodDelegation.ImplementationDelegate.ForField, MethodDelegation.ImplementationDelegate.ForMethodReturn, MethodDelegation.ImplementationDelegate.ForStaticMethod| Modifier and Type | Field and Description |
|---|---|
private TypeDescription.Generic |
fieldType
The field's type.
|
private java.lang.Object |
target
The target instance.
|
fieldName, matcher, methodGraphCompiler, parameterBindersFIELD_NAME_PREFIX| Modifier | Constructor and Description |
|---|---|
protected |
WithInstance(java.lang.String fieldName,
MethodGraph.Compiler methodGraphCompiler,
java.util.List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders,
ElementMatcher<? super MethodDescription> matcher,
java.lang.Object target,
TypeDescription.Generic fieldType)
Creates a new implementation delegate for invoking methods on a supplied instance.
|
| Modifier and Type | Method and Description |
|---|---|
InstrumentedType |
prepare(InstrumentedType instrumentedType) |
protected FieldDescription |
resolve(TypeDescription instrumentedType)
Resolves the field to which is delegated.
|
compileprivate final java.lang.Object target
private final TypeDescription.Generic fieldType
protected WithInstance(java.lang.String fieldName,
MethodGraph.Compiler methodGraphCompiler,
java.util.List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders,
ElementMatcher<? super MethodDescription> matcher,
java.lang.Object target,
TypeDescription.Generic fieldType)
fieldName - The name of the field that is target of the delegation.methodGraphCompiler - The method graph compiler to use.parameterBinders - The parameter binders to use.matcher - The matcher to use for filtering methods.target - The target instance.fieldType - The field's type.public InstrumentedType prepare(InstrumentedType instrumentedType)
protected FieldDescription resolve(TypeDescription instrumentedType)
MethodDelegation.ImplementationDelegate.ForFieldresolve in class MethodDelegation.ImplementationDelegate.ForFieldinstrumentedType - The instrumented type.