Package javax.validation.executable

Examples of javax.validation.executable.ValidateOnExecution


    return executableTypes;
  }

  private EnumSet<ExecutableType> executableTypesDefinedOnMethod(Method method, boolean isGetter) {
    ValidateOnExecution validateOnExecutionAnnotation = method.getAnnotation( ValidateOnExecution.class );
    EnumSet<ExecutableType> executableTypes = commonExecutableTypeChecks( validateOnExecutionAnnotation );

    if ( executableTypes.contains( ExecutableType.IMPLICIT ) ) {
      if ( isGetter ) {
        executableTypes.add( ExecutableType.GETTER_METHODS );
View Full Code Here


    return executableTypes;
  }

  private EnumSet<ExecutableType> executableTypesDefinedOnConstructor(Constructor constructor) {
    ValidateOnExecution validateOnExecutionAnnotation = (ValidateOnExecution) constructor.getAnnotation(
        ValidateOnExecution.class
    );
    EnumSet<ExecutableType> executableTypes = commonExecutableTypeChecks( validateOnExecutionAnnotation );

    if ( executableTypes.contains( ExecutableType.IMPLICIT ) ) {
View Full Code Here

     *
     * @param element element to be examined for {@link ValidateOnExecution}.
     * @return set of executable types or an empty set if the element is not annotated with {@link ValidateOnExecution}.
     */
    private Set<ExecutableType> getExecutableTypes(final AnnotatedElement element) {
        final ValidateOnExecution validateExecutable = element.getAnnotation(ValidateOnExecution.class);
        return validateExecutable != null ? Sets.newHashSet(validateExecutable.type()) : Collections.<ExecutableType>emptySet();
    }
View Full Code Here

    return !globalExecutableTypes.contains( currentExecutableType );
  }

  private EnumSet<ExecutableType> executableTypesDefinedOnType(Class<?> clazz) {
    ValidateOnExecution validateOnExecutionAnnotation = clazz.getAnnotation( ValidateOnExecution.class );
    EnumSet<ExecutableType> executableTypes = commonExecutableTypeChecks( validateOnExecutionAnnotation );

    if ( executableTypes.contains( ExecutableType.IMPLICIT ) ) {
      return DEFAULT_EXECUTABLE_TYPES;
    }
View Full Code Here

    return executableTypes;
  }

  private EnumSet<ExecutableType> executableTypesDefinedOnMethod(Method method, boolean isGetter) {
    ValidateOnExecution validateOnExecutionAnnotation = method.getAnnotation( ValidateOnExecution.class );
    EnumSet<ExecutableType> executableTypes = commonExecutableTypeChecks( validateOnExecutionAnnotation );

    if ( executableTypes.contains( ExecutableType.IMPLICIT ) ) {
      if ( isGetter ) {
        executableTypes.add( ExecutableType.GETTER_METHODS );
View Full Code Here

    return executableTypes;
  }

  private EnumSet<ExecutableType> executableTypesDefinedOnConstructor(Constructor<?> constructor) {
    ValidateOnExecution validateOnExecutionAnnotation = constructor.getAnnotation(
        ValidateOnExecution.class
    );
    EnumSet<ExecutableType> executableTypes = commonExecutableTypeChecks( validateOnExecutionAnnotation );

    if ( executableTypes.contains( ExecutableType.IMPLICIT ) ) {
View Full Code Here

     *
     * @param element element to be examined for {@link ValidateOnExecution}.
     * @return set of executable types or an empty set if the element is not annotated with {@link ValidateOnExecution}.
     */
    private Set<ExecutableType> getExecutableTypes(final AnnotatedElement element) {
        final ValidateOnExecution validateExecutable = element.getAnnotation(ValidateOnExecution.class);
        return validateExecutable != null ? Sets.newHashSet(validateExecutable.type()) : Collections.<ExecutableType>emptySet();
    }
View Full Code Here

      {
         types = typesList.get(0);
      }
      else
      {
         ValidateOnExecution voe = m.getDeclaringClass().getAnnotation(ValidateOnExecution.class);
         if (voe == null)
         {
            types = defaultValidatedExecutableTypes;
         }
         else
         {
            if (voe.type().length > 0)
            {
               types = voe.type();
            }
            else
            {
               types = defaultValidatedExecutableTypes;
            }
View Full Code Here

     return typesList;
   }
  
   static protected ExecutableType[] getExecutableTypesOnMethod(Method method)
   {
     ValidateOnExecution voe = method.getAnnotation(ValidateOnExecution.class);
     if (voe == null || voe.type().length == 0)
     {
       return null;
     }
     ExecutableType[] types = voe.type();
     if (types == null || types.length == 0)
     {
       return null;
     }
     return types;
View Full Code Here

    return !globalExecutableTypes.contains( currentExecutableType );
  }

  private EnumSet<ExecutableType> executableTypesDefinedOnType(Class<?> clazz) {
    ValidateOnExecution validateOnExecutionAnnotation = clazz.getAnnotation( ValidateOnExecution.class );
    EnumSet<ExecutableType> executableTypes = commonExecutableTypeChecks( validateOnExecutionAnnotation );

    if ( executableTypes.contains( ExecutableType.IMPLICIT ) ) {
      return DEFAULT_EXECUTABLE_TYPES;
    }
View Full Code Here

TOP

Related Classes of javax.validation.executable.ValidateOnExecution

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.