Class MethodDelegation.ImplementationDelegate.ForField.WithLookup
java.lang.Object
net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate.ForField
net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate.ForField.WithLookup
- All Implemented Interfaces:
InstrumentedType.Prepareable, MethodDelegation.ImplementationDelegate
- Enclosing class:
MethodDelegation.ImplementationDelegate.ForField
@Enhance
protected static class MethodDelegation.ImplementationDelegate.ForField.WithLookup
extends MethodDelegation.ImplementationDelegate.ForField
An implementation target for a field that is declared by the instrumented type or a super type.
-
Nested Class Summary
Nested classes/interfaces inherited from class MethodDelegation.ImplementationDelegate.ForField
MethodDelegation.ImplementationDelegate.ForField.WithInstance, MethodDelegation.ImplementationDelegate.ForField.WithLookupNested classes/interfaces inherited from interface InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOpNested classes/interfaces inherited from interface MethodDelegation.ImplementationDelegate
MethodDelegation.ImplementationDelegate.Compiled, MethodDelegation.ImplementationDelegate.ForConstruction, MethodDelegation.ImplementationDelegate.ForField, MethodDelegation.ImplementationDelegate.ForMethodReturn, MethodDelegation.ImplementationDelegate.ForStaticMethod -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FieldLocator.FactoryThe field locator factory to use for locating the field to delegate to.Fields inherited from class MethodDelegation.ImplementationDelegate.ForField
fieldName, matcher, methodGraphCompiler, parameterBindersFields inherited from interface MethodDelegation.ImplementationDelegate
FIELD_NAME_PREFIX -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedWithLookup(String fieldName, MethodGraph.Compiler methodGraphCompiler, List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders, ElementMatcher<? super MethodDescription> matcher, FieldLocator.Factory fieldLocatorFactory) Creates a new implementation delegate for a field that is declared by the instrumented type or any super type. -
Method Summary
Modifier and TypeMethodDescriptionprepare(InstrumentedType instrumentedType) Prepares a given instrumented type.protected FieldDescriptionresolve(TypeDescription instrumentedType) Resolves the field to which is delegated.Methods inherited from class MethodDelegation.ImplementationDelegate.ForField
compile
-
Field Details
-
fieldLocatorFactory
The field locator factory to use for locating the field to delegate to.
-
-
Constructor Details
-
WithLookup
protected WithLookup(String fieldName, MethodGraph.Compiler methodGraphCompiler, List<? extends TargetMethodAnnotationDrivenBinder.ParameterBinder<?>> parameterBinders, ElementMatcher<? super MethodDescription> matcher, FieldLocator.Factory fieldLocatorFactory) Creates a new implementation delegate for a field that is declared by the instrumented type or any super type.- Parameters:
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.fieldLocatorFactory- The field locator factory to use for locating the field to delegate to.
-
-
Method Details
-
prepare
Prepares a given instrumented type.- Parameters:
instrumentedType- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
resolve
Description copied from class:MethodDelegation.ImplementationDelegate.ForFieldResolves the field to which is delegated.- Specified by:
resolvein classMethodDelegation.ImplementationDelegate.ForField- Parameters:
instrumentedType- The instrumented type.- Returns:
- The field that is the delegation target.
-