Class ParanamerParameterNameProvider
- java.lang.Object
-
- org.hibernate.validator.parameternameprovider.ParanamerParameterNameProvider
-
- All Implemented Interfaces:
ParameterNameProvider
public class ParanamerParameterNameProvider extends Object implements ParameterNameProvider
AParameterNameProviderimplementation backed by the ParaNamer library.The
Paranamerimplementation to use can be passed when creating aParanamerParameterNameProvider. By default aAdaptiveParanamerwill be used which is wrapped into aCachingParanamer. If no parameter names can be obtained from the configuredParanamer, 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:
- ParaNamer web site
-
-
Constructor Summary
Constructors Constructor Description ParanamerParameterNameProvider()ParanamerParameterNameProvider(com.thoughtworks.paranamer.Paranamer paranamer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getParameterNames(Constructor<?> constructor)Returns the names of the parameters of the given constructor.List<String>getParameterNames(Method method)Returns the names of the parameters of the given method.
-
-
-
Method Detail
-
getParameterNames
public List<String> getParameterNames(Constructor<?> constructor)
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
public List<String> getParameterNames(Method method)
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
-
-