Package org.eclipse.emf.cdo.etypes
Interface AnnotationValidator
- All Known Implementing Classes:
BasicAnnotationValidator
public interface AnnotationValidator
An annotation validity checker for a specific
annotation source
.
Implementations of AnnotationValidator should extend BasicAnnotationValidator
or one of its derived classes because methods may be added to this API.
- Since:
- 4.22
- See Also:
- No Implement
- Do not implement this interface directly; instead extend
BasicAnnotationValidator
or one of its subclasses.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A registry fromannotation source
toAnnotationValidator
. -
Method Summary
Modifier and TypeMethodDescriptionReturns theannotation source
of the annotations validated by this annotation validator.boolean
isValidLocation
(Annotation annotation) Returns whether this annotation with this annotation validator'sannotation source
is valid at itscurrent location
.boolean
validate
(Annotation annotation, DiagnosticChain diagnostics, Map<Object, Object> context) Returns whether this annotation is valid.
-
Method Details
-
getAnnotationSource
String getAnnotationSource()Returns theannotation source
of the annotations validated by this annotation validator.- Returns:
- the annotation source.
-
isValidLocation
Returns whether this annotation with this annotation validator'sannotation source
is valid at itscurrent location
.- Parameters:
annotation
- the annotation in question.- Returns:
- whether this annotation with this annotation validator's annotation source is valid at its current location.
-
validate
Returns whether this annotation is valid.- Parameters:
annotation
- the annotation in question.diagnostics
- a place to accumulate diagnostics; if it'snull
, no diagnostics should be produced.context
- a place to cache information, if it'snull
, no cache is supported.- Returns:
- whether this annotation is valid.
- See Also:
-