Package net.bytebuddy.implementation
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 net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate.ForField
MethodDelegation.ImplementationDelegate.ForField.WithInstance, MethodDelegation.ImplementationDelegate.ForField.WithLookup
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp
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
FieldsModifier and TypeFieldDescriptionprivate final FieldLocator.Factory
The field locator factory to use for locating the field to delegate to.Fields inherited from class net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate.ForField
fieldName, matcher, methodGraphCompiler, parameterBinders
Fields inherited from interface net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate
FIELD_NAME_PREFIX
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
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. -
Method Summary
Modifier and TypeMethodDescriptionprepare
(InstrumentedType instrumentedType) Prepares a given instrumented type.protected FieldDescription
resolve
(TypeDescription instrumentedType) Resolves the field to which is delegated.Methods inherited from class net.bytebuddy.implementation.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.ForField
Resolves the field to which is delegated.- Specified by:
resolve
in classMethodDelegation.ImplementationDelegate.ForField
- Parameters:
instrumentedType
- The instrumented type.- Returns:
- The field that is the delegation target.
-