|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.validator.ap.util.ConstraintHelper
public class ConstraintHelper
Helper class that deals with all constraint-related stuff, such as determining whether a given annotation represents a constraint annotation or whether a given annotation is allowed to be declared at a given element.
| Nested Class Summary | |
|---|---|
static class |
ConstraintHelper.AnnotationType
The type of an annotation with respect to the BV API. |
static class |
ConstraintHelper.ConstraintCheckResult
Possible results of a constraint check as returned by checkConstraint(DeclaredType, TypeMirror). |
| Constructor Summary | |
|---|---|
ConstraintHelper(javax.lang.model.util.Elements elementUtils,
javax.lang.model.util.Types typeUtils,
AnnotationApiHelper annotationApiHelper)
|
|
| Method Summary | |
|---|---|
ConstraintHelper.ConstraintCheckResult |
checkConstraint(javax.lang.model.type.DeclaredType constraintAnnotationType,
javax.lang.model.type.TypeMirror typeOfAnnotatedElement)
Checks whether the given annotation type (which must be a constraint annotation type) may be specified at elements of the specified type. |
ConstraintHelper.AnnotationType |
getAnnotationType(javax.lang.model.element.AnnotationMirror annotationMirror)
Returns the ConstraintHelper.AnnotationType of the given annotation. |
List<javax.lang.model.element.AnnotationMirror> |
getPartsOfMultiValuedConstraint(javax.lang.model.element.AnnotationMirror annotationMirror)
Returns a list with the constraint annotations contained in the given array-valued annotation mirror. |
boolean |
isConstraintAnnotation(javax.lang.model.element.Element element)
Checks, whether the given type element represents a constraint annotation or not. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstraintHelper(javax.lang.model.util.Elements elementUtils,
javax.lang.model.util.Types typeUtils,
AnnotationApiHelper annotationApiHelper)
| Method Detail |
|---|
public boolean isConstraintAnnotation(javax.lang.model.element.Element element)
Constraint meta-annotation (which is only allowed at annotation
declarations).
element - The element of interest.
public ConstraintHelper.AnnotationType getAnnotationType(javax.lang.model.element.AnnotationMirror annotationMirror)
ConstraintHelper.AnnotationType of the given annotation.
annotationMirror - The annotation mirror of interest.
public List<javax.lang.model.element.AnnotationMirror> getPartsOfMultiValuedConstraint(javax.lang.model.element.AnnotationMirror annotationMirror)
annotationMirror - An array-valued annotation mirror (meaning it has an
array-typed attribute with name "value").
public ConstraintHelper.ConstraintCheckResult checkConstraint(javax.lang.model.type.DeclaredType constraintAnnotationType,
javax.lang.model.type.TypeMirror typeOfAnnotatedElement)
constraintAnnotationType - A constraint annotation type.typeOfAnnotatedElement - A type which with an element is annotated.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||