Class JerseyParameterNameProvider

  • All Implemented Interfaces:
    javax.validation.ParameterNameProvider

    public class JerseyParameterNameProvider
    extends org.hibernate.validator.parameternameprovider.ReflectionParameterNameProvider
    Adds jersey support to parameter name discovery in hibernate validator.

    This provider will behave like the hibernate-provided ReflectionParameterNameProvider except when a method parameter is annotated with a jersey parameter annotation, like QueryParam. If a jersey parameter annotation is present the value of the annotation is used as the parameter name.

    • Constructor Detail

      • JerseyParameterNameProvider

        public JerseyParameterNameProvider()
    • Method Detail

      • getParameterNames

        public List<String> getParameterNames​(Method method)
        Specified by:
        getParameterNames in interface javax.validation.ParameterNameProvider
        Overrides:
        getParameterNames in class org.hibernate.validator.parameternameprovider.ReflectionParameterNameProvider
      • getParameterNameFromAnnotations

        public static Optional<String> getParameterNameFromAnnotations​(Annotation[] memberAnnotations)
        Derives member's name and type from it's annotations