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)
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 © 2016 JBoss by Red Hat. All rights reserved.