Top Constructors Methods
org.hibernate.validator.parameternameprovider

public Class ReflectionParameterNameProvider

extends Object
implements ParameterNameProvider
Class Inheritance
All Implemented Interfaces
jakarta.validation.ParameterNameProvider
Annotations
@Deprecated
Static Imports
org.hibernate.validator.internal.util.CollectionHelper.newArrayList

Deprecated

since 6.0 - getting the parameter names via reflection is now enabled by default. Planned for removal.

Author
Khalid Alqinyah
Since
5.2

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public List<String>
getParameterNames(Constructor<?>
the constructor for which the parameter names shall be retrieved; never null
constructor
)

Implements jakarta.validation.ParameterNameProvider.getParameterNames.

Returns the names of the parameters of the given constructor.
public List<String>
getParameterNames(Method
the method for which the parameter names shall be retrieved; never null
method
)

Implements jakarta.validation.ParameterNameProvider.getParameterNames.

Returns the names of the parameters of the given method.
private List<String>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ReflectionParameterNameProviderback to summary
public ReflectionParameterNameProvider()

Method Detail

getParameterNamesback to summary
public List<String> getParameterNames(Constructor<?> constructor)

Implements jakarta.validation.ParameterNameProvider.getParameterNames.

Doc from jakarta.validation.ParameterNameProvider.getParameterNames.

Returns the names of the parameters of the given constructor.

Parameters
constructor:Constructor<?>

the constructor for which the parameter names shall be retrieved; never null

Returns:List<String>

a list containing the names of the parameters of the given constructor; may be empty but never null

Annotations
@Override
getParameterNamesback to summary
public List<String> getParameterNames(Method method)

Implements jakarta.validation.ParameterNameProvider.getParameterNames.

Doc from jakarta.validation.ParameterNameProvider.getParameterNames.

Returns the names of the parameters of the given method.

Parameters
method:Method

the method for which the parameter names shall be retrieved; never null

Returns:List<String>

a list containing the names of the parameters of the given method; may be empty but never null

Annotations
@Override
getParameterNamesback to summary
private List<String> getParameterNames(Parameter[] parameters)