Class AnnotationProxyBuilder<A extends Annotation>


  • public final class AnnotationProxyBuilder<A extends Annotation>
    extends Object
    Description: Holds the information and creates an annotation proxy during xml parsing of validation mapping constraints.
    • Constructor Detail

      • AnnotationProxyBuilder

        AnnotationProxyBuilder​(Class<A> annotationType,
                               ConcurrentMap<Class<?>,​Method[]> cache)
        Create a new AnnotationProxyBuilder instance.
        Parameters:
        annotationType -
        cache -
      • AnnotationProxyBuilder

        AnnotationProxyBuilder​(A annot,
                               ConcurrentMap<Class<?>,​Method[]> cache)
        Create a builder initially configured to create an annotation equivalent to annot.
        Parameters:
        annot - Annotation to be replicated.
        cache -
    • Method Detail

      • getMethods

        public Method[] getMethods()
      • setValue

        public boolean setValue​(String elementName,
                                Object value)
        Add an element to the configuration.
        Parameters:
        elementName -
        value -
        Returns:
        whether any change occurred
      • getValue

        public Object getValue​(String elementName)
        Get the specified element value from the current configuration.
        Parameters:
        elementName -
        Returns:
        Object value
      • contains

        public boolean contains​(String elementName)
        Learn whether a given element has been configured.
        Parameters:
        elementName -
        Returns:
        true if an elementName element is found on this annotation
      • size

        public int size()
        Get the number of configured elements.
        Returns:
        int
      • getType

        public Class<A> getType()
        Get the configured Annotation type.
        Returns:
        Class
      • setMessage

        public boolean setMessage​(String message)
        Configure the well-known JSR303 "message" element.
        Parameters:
        message -
        Returns:
      • setGroups

        public boolean setGroups​(Class<?>[] groups)
        Configure the well-known JSR303 "groups" element.
        Parameters:
        groups -
        Returns:
      • setPayload

        public boolean setPayload​(Class<? extends jakarta.validation.Payload>[] payload)
        Configure the well-known JSR303 "payload" element.
        Parameters:
        payload -
        Returns:
      • setValidationAppliesTo

        public boolean setValidationAppliesTo​(jakarta.validation.ConstraintTarget constraintTarget)
        Configure the well-known "validationAppliesTo" element.
        Parameters:
        constraintTarget -
      • isChanged

        public boolean isChanged()
      • createAnnotation

        public A createAnnotation()
        Create the annotation represented by this builder.
        Returns:
        Annotation