Class TargetMethodAnnotationDrivenBinder.ParameterBinder.ForFieldBinding<S extends java.lang.annotation.Annotation>

    • Field Detail

      • BEAN_PROPERTY

        protected static final java.lang.String BEAN_PROPERTY
        Indicates that a name should be extracted from an accessor method.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ForFieldBinding

        public ForFieldBinding()
    • Method Detail

      • resolveAccessor

        private static FieldLocator.Resolution resolveAccessor​(FieldLocator fieldLocator,
                                                               MethodDescription methodDescription)
        Resolves a field locator for a potential accessor method.
        Parameters:
        fieldLocator - The field locator to use.
        methodDescription - The method description that is the potential accessor.
        Returns:
        A resolution for a field locator.
      • fieldName

        protected abstract java.lang.String fieldName​(AnnotationDescription.Loadable<S> annotation)
        Extracts the field name from an annotation.
        Parameters:
        annotation - The annotation from which to extract the field name.
        Returns:
        The field name defined by the handled annotation.
      • declaringType

        protected abstract TypeDescription declaringType​(AnnotationDescription.Loadable<S> annotation)
        Extracts the declaring type from an annotation.
        Parameters:
        annotation - The annotation from which to extract the declaring type.
        Returns:
        The declaring type defined by the handled annotation.
      • bind

        protected abstract MethodDelegationBinder.ParameterBinding<?> bind​(FieldDescription fieldDescription,
                                                                           AnnotationDescription.Loadable<S> annotation,
                                                                           MethodDescription source,
                                                                           ParameterDescription target,
                                                                           Implementation.Target implementationTarget,
                                                                           Assigner assigner)
        Creates a parameter binding for the given target parameter.
        Parameters:
        fieldDescription - The field for which this binder binds a value.
        annotation - The annotation that was cause for the delegation to this argument binder.
        source - The intercepted source method.
        target - Tge target parameter that is subject to be bound to intercepting the source method.
        implementationTarget - The target of the current implementation that is subject to this binding.
        assigner - An assigner that can be used for applying the binding.
        Returns:
        A parameter binding for the requested target method parameter.