Package org.hibernate.validator.util

Examples of org.hibernate.validator.util.GetMethod


    }
  }

  private void assertPayloadParameterExists(Annotation annotation) {
    try {
      final GetMethod getMethod = GetMethod.action( annotation.annotationType(), "payload" );
      final Method method;
      if ( System.getSecurityManager() != null ) {
        method = AccessController.doPrivileged( getMethod );
      }
      else {
        method = getMethod.run();
      }
      if (method == null) {
        String msg = annotation.annotationType().getName() + " contains Constraint annotation, but does " +
          "not contain a payload parameter.";
        throw new ConstraintDefinitionException( msg );
View Full Code Here


    }
  }

  private void assertGroupsParameterExists(Annotation annotation) {
    try {
      final GetMethod getMethod = GetMethod.action( annotation.annotationType(), "groups" );
      final Method method;
      if ( System.getSecurityManager() != null ) {
        method = AccessController.doPrivileged( getMethod );
      }
      else {
        method = getMethod.run();
      }
      if (method == null) {
        String msg = annotation.annotationType().getName() + " contains Constraint annotation, but does " +
          "not contain a groups parameter.";
        throw new ConstraintDefinitionException( msg );
View Full Code Here

    return new MetaConstraint<T, A>( beanClass, member, constraintDescriptor );
  }

  private <A extends Annotation> Class<?> getAnnotationParameterType(Class<A> annotationClass, String name) {
    Method m;
    GetMethod action = GetMethod.action( annotationClass, name );
    if ( System.getSecurityManager() != null ) {
      m = AccessController.doPrivileged( action );
    }
    else {
      m = action.run();
    }

    if ( m == null ) {
      throw new ValidationException( "Annotation of type " + annotationClass.getName() + " does not contain a parameter " + name + "." );
    }
View Full Code Here

TOP

Related Classes of org.hibernate.validator.util.GetMethod

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.