org.hibernate.validator.ap

## Class ConstraintValidationProcessor

- java.lang.Object
- - javax.annotation.processing.AbstractProcessor
  - - org.hibernate.validator.ap.ConstraintValidationProcessor

- All Implemented Interfaces:
    Processor

      @SupportedAnnotationTypes(value="*")
      @SupportedOptions(value={"diagnosticKind","verbose","methodConstraintsSupported"})
      public class ConstraintValidationProcessor
      extends AbstractProcessor

  An annotation processor for checking Bean Validation constraints. The processor supports the following options:
  - `diagnosticKind`: the severity with which any occurred problems shall be reported. Must be given in form of the string representation of a value from `Diagnostic.Kind`, e.g. "diagnosticKind=WARNING". Default is Kind.ERROR.
  - `verbose`: whether a verbose output shall be created or not. Must be given as String parsable by `Boolean.parseBoolean(java.lang.String)`. Default is `false`.
  - `methodConstraintsSupported`: Whether constraints at other methods than JavaBeans getter methods may be annotated with constraints or not. Must be given as String parsable by `Boolean.parseBoolean(java.lang.String)`. Can be set to `false` in order to allow only getter based property constraints but not method level constraints as supported by Hibernate Validator. Default is `true`.
  Author:
    Hardy Ferentschik, Gunnar Morling

- - ### Field Summary

    - ### Fields inherited from class javax.annotation.processing.AbstractProcessor

      `processingEnv`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConstraintValidationProcessor()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SourceVersion` | `getSupportedSourceVersion()`
    `void` | `init(ProcessingEnvironment processingEnv)`
    `boolean` | `process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment)`

    - ### Methods inherited from class javax.annotation.processing.AbstractProcessor

      `getCompletions, getSupportedAnnotationTypes, getSupportedOptions, isInitialized`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConstraintValidationProcessor

          public ConstraintValidationProcessor()

  - ### Method Detail

    - #### init

          public void init(ProcessingEnvironment processingEnv)

      Specified by:
        `init` in interface `Processor`
      Overrides:
        `init` in class `AbstractProcessor`

    - #### getSupportedSourceVersion

          public SourceVersion getSupportedSourceVersion()

      Specified by:
        `getSupportedSourceVersion` in interface `Processor`
      Overrides:
        `getSupportedSourceVersion` in class `AbstractProcessor`

    - #### process

          public boolean process(Set<? extends TypeElement> annotations,
                        RoundEnvironment roundEnvironment)

      Specified by:
        `process` in interface `Processor`
      Specified by:
        `process` in class `AbstractProcessor`

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved