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
Fields Modifier and Type Field Description private FieldLocator.FactoryfieldLocatorFactoryThe 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
Constructors Modifier Constructor Description protectedWithLookup(java.lang.String fieldName, MethodGraph.Compiler methodGraphCompiler, java.util.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InstrumentedTypeprepare(InstrumentedType instrumentedType)Prepares a given instrumented type.protected FieldDescriptionresolve(TypeDescription instrumentedType)Resolves the field to which is delegated.-
Methods inherited from class net.bytebuddy.implementation.MethodDelegation.ImplementationDelegate.ForField
compile
-
-
-
-
Field Detail
-
fieldLocatorFactory
private final FieldLocator.Factory fieldLocatorFactory
The field locator factory to use for locating the field to delegate to.
-
-
Constructor Detail
-
WithLookup
protected WithLookup(java.lang.String fieldName, MethodGraph.Compiler methodGraphCompiler, java.util.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 Detail
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Parameters:
instrumentedType- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
resolve
protected FieldDescription resolve(TypeDescription instrumentedType)
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.
-
-