final GetMethods getMethods = GetMethods.action( annotation.annotationType() );
if ( System.getSecurityManager() != null ) {
methods = AccessController.doPrivileged( getMethods );
}
else {
methods = getMethods.run();
}
for ( Method m : methods ) {
if ( m.getName().startsWith( "valid" ) ) {
String msg = "Parameters starting with 'valid' are not allowed in a constraint.";
throw new ConstraintDefinitionException( msg );