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