public abstract class AnnotationParametersAbstractCheck extends AbstractConstraintCheck
Modifier and Type | Field and Description |
---|---|
protected AnnotationApiHelper |
annotationApiHelper |
Constructor and Description |
---|
AnnotationParametersAbstractCheck(AnnotationApiHelper annotationApiHelper,
String... annotationClass) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canCheckThisAnnotation(AnnotationMirror annotation)
Verify that this check class can process such annotation.
|
Set<ConstraintCheckIssue> |
checkAnnotationType(TypeElement element,
AnnotationMirror annotation)
Checks, whether the given annotation is allowed at the given annotation
type declaration.
|
Set<ConstraintCheckIssue> |
checkField(VariableElement element,
AnnotationMirror annotation)
Checks, whether the given annotation is allowed at the given field.
|
Set<ConstraintCheckIssue> |
checkMethod(ExecutableElement element,
AnnotationMirror annotation)
Checks, whether the given annotation is allowed at the given method.
|
Set<ConstraintCheckIssue> |
checkNonAnnotationType(TypeElement element,
AnnotationMirror annotation)
Checks, whether the given annotation is allowed at the given type
declaration (class, interface, enum).
|
protected abstract Set<ConstraintCheckIssue> |
doCheck(Element element,
AnnotationMirror annotation)
Method which actually performs the validation of the annotation parameters.
|
protected final AnnotationApiHelper annotationApiHelper
public AnnotationParametersAbstractCheck(AnnotationApiHelper annotationApiHelper, String... annotationClass)
public Set<ConstraintCheckIssue> checkField(VariableElement element, AnnotationMirror annotation)
ConstraintCheck
checkField
in interface ConstraintCheck
checkField
in class AbstractConstraintCheck
element
- An annotated field.annotation
- An annotation at that field.public Set<ConstraintCheckIssue> checkMethod(ExecutableElement element, AnnotationMirror annotation)
ConstraintCheck
checkMethod
in interface ConstraintCheck
checkMethod
in class AbstractConstraintCheck
element
- An annotated method.annotation
- An annotation at that method.public Set<ConstraintCheckIssue> checkAnnotationType(TypeElement element, AnnotationMirror annotation)
ConstraintCheck
checkAnnotationType
in interface ConstraintCheck
checkAnnotationType
in class AbstractConstraintCheck
element
- An annotated annotation type declaration.annotation
- An annotation at that annotation type.public Set<ConstraintCheckIssue> checkNonAnnotationType(TypeElement element, AnnotationMirror annotation)
ConstraintCheck
checkNonAnnotationType
in interface ConstraintCheck
checkNonAnnotationType
in class AbstractConstraintCheck
element
- An annotated type declaration.annotation
- An annotation at that type.protected boolean canCheckThisAnnotation(AnnotationMirror annotation)
annotation
- annotation you want to process by this classtrue
if such annotation can be processed, false
otherwise.protected abstract Set<ConstraintCheckIssue> doCheck(Element element, AnnotationMirror annotation)
element
- annotated elementannotation
- annotation to processConstraintCheckIssue
errors if there are any validation issues with the annotation
parametersCopyright © 2007-2021 Red Hat, Inc. All Rights Reserved