javax.validation
Interface ParameterNameProvider


public interface ParameterNameProvider

Provides names for method and constructor parameters.

Used by the Bean Validation runtime when creating constraint violation objects for violated method-level constraints.

Implementations must be thread-safe.

Author:
Gunnar Morling

Method Summary
 String[] getParameterNames(Constructor<?> constructor)
          Returns the names of the parameters of the given constructor.
 String[] getParameterNames(Method method)
          Returns the names of the parameters of the given method.
 

Method Detail

getParameterNames

String[] getParameterNames(Constructor<?> constructor)
Returns the names of the parameters of the given constructor.

Parameters:
constructor - The constructor for which the parameter names shall be retrieved. Never null.
Returns:
An array with the names of the parameters of the given constructor. May be empty but never null.

getParameterNames

String[] getParameterNames(Method method)
Returns the names of the parameters of the given method.

Parameters:
method - The method for which the parameter names shall be retrieved. Never null.
Returns:
An array with the names of the parameters of the given method. May be empty but never null.


Copyright © 2007-2012. All Rights Reserved.