![JAR search and dependency download from the Maven repository](/logo.png)
org.hibernate.beanvalidation.tck.tests.validation.CustomParameterNameProvider Maven / Gradle / Ivy
The newest version!
/**
* Jakarta Bean Validation TCK
*
* License: Apache License, Version 2.0
* See the license.txt file in the root directory or .
*/
package org.hibernate.beanvalidation.tck.tests.validation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import javax.validation.ParameterNameProvider;
/**
* @author Gunnar Morling
*/
public class CustomParameterNameProvider implements ParameterNameProvider {
@Override
public List getParameterNames(Constructor> constructor) {
List names = new ArrayList();
for ( int i = 0; i < constructor.getParameterTypes().length; i++ ) {
names.add( "param" + i );
}
return names;
}
@Override
public List getParameterNames(Method method) {
List names = new ArrayList();
for ( int i = 0; i < method.getParameterTypes().length; i++ ) {
names.add( "param" + i );
}
return names;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy