public class ParanamerParameterNameProvider extends Object implements ParameterNameProvider
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.
Constructor and Description |
---|
ParanamerParameterNameProvider() |
ParanamerParameterNameProvider(Paranamer paranamer) |
Modifier and Type | Method and 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.
|
public ParanamerParameterNameProvider()
public ParanamerParameterNameProvider(Paranamer paranamer)
public List<String> getParameterNames(Constructor<?> constructor)
ParameterNameProvider
getParameterNames
in interface ParameterNameProvider
constructor
- the constructor for which the parameter names shall be
retrieved; never null
null
public List<String> getParameterNames(Method method)
ParameterNameProvider
getParameterNames
in interface ParameterNameProvider
method
- the method for which the parameter names shall be retrieved;
never null
null
Copyright © 2019 JBoss by Red Hat. All rights reserved.