Package io.dropwizard.jersey.validation
Class JerseyParameterNameProvider
- java.lang.Object
-
- org.hibernate.validator.parameternameprovider.ReflectionParameterNameProvider
-
- io.dropwizard.jersey.validation.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, likeQueryParam
. If a jersey parameter annotation is present the value of the annotation is used as the parameter name.
-
-
Constructor Summary
Constructors Constructor Description JerseyParameterNameProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Optional<String>
getParameterNameFromAnnotations(Annotation[] memberAnnotations)
Derives member's name and type from it's annotationsList<String>
getParameterNames(Method method)
-
-
-
Method Detail
-
getParameterNames
public List<String> getParameterNames(Method method)
- Specified by:
getParameterNames
in interfacejavax.validation.ParameterNameProvider
- Overrides:
getParameterNames
in classorg.hibernate.validator.parameternameprovider.ReflectionParameterNameProvider
-
getParameterNameFromAnnotations
public static Optional<String> getParameterNameFromAnnotations(Annotation[] memberAnnotations)
Derives member's name and type from it's annotations
-
-