public class ReflectionParameterNameProvider extends Object implements ParameterNameProvider
For this provider to return the actual parameter names, classes must be compiled with the '-parameters' compiler
argument. Otherwise, the JDK will return synthetic names in the form arg0, arg1, etc.
See also JEP 118
| Constructor and Description |
|---|
ReflectionParameterNameProvider() |
| 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 List<String> getParameterNames(Constructor<?> constructor)
ParameterNameProvidergetParameterNames in interface ParameterNameProviderconstructor - the constructor for which the parameter names shall be
retrieved; never nullnullpublic List<String> getParameterNames(Method method)
ParameterNameProvidergetParameterNames in interface ParameterNameProvidermethod - the method for which the parameter names shall be retrieved;
never nullnullCopyright © 2016 JBoss by Red Hat. All rights reserved.