Class ParanamerParameterNameProvider
java.lang.Object
org.hibernate.validator.parameternameprovider.ParanamerParameterNameProvider
- All Implemented Interfaces:
ParameterNameProvider
A
ParameterNameProvider implementation backed by the ParaNamer
library.
The Paranamer implementation to use can be passed when creating a ParanamerParameterNameProvider. By
default a AdaptiveParanamer will be used which is wrapped into a CachingParanamer. If no parameter
names can be obtained from the configured Paranamer, the default parameter name provider will be used as
fall back.
The ParaNamer library must be present on the classpath when using this parameter name provider.
- Author:
- Gunnar Morling
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionParanamerParameterNameProvider(com.thoughtworks.paranamer.Paranamer paranamer) -
Method Summary
Modifier and TypeMethodDescriptiongetParameterNames(Constructor<?> constructor) Returns the names of the parameters of the given constructor.getParameterNames(Method method) Returns the names of the parameters of the given method.
-
Constructor Details
-
ParanamerParameterNameProvider
public ParanamerParameterNameProvider() -
ParanamerParameterNameProvider
public ParanamerParameterNameProvider(com.thoughtworks.paranamer.Paranamer paranamer)
-
-
Method Details
-
getParameterNames
Description copied from interface:ParameterNameProviderReturns the names of the parameters of the given constructor.- Specified by:
getParameterNamesin interfaceParameterNameProvider- Parameters:
constructor- the constructor for which the parameter names shall be retrieved; nevernull- Returns:
- a list containing the names of the parameters of the given
constructor; may be empty but never
null
-
getParameterNames
Description copied from interface:ParameterNameProviderReturns the names of the parameters of the given method.- Specified by:
getParameterNamesin interfaceParameterNameProvider- Parameters:
method- the method for which the parameter names shall be retrieved; nevernull- Returns:
- a list containing the names of the parameters of the given method;
may be empty but never
null
-