Package org.eclipse.emf.cdo.etypes

# Schnittstelle AnnotationValidator

Alle bekannten Implementierungsklassen:
  `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.

Seit:
  4.22
Siehe auch:
  - `BasicAnnotationValidator`
No Implement
  Do not implement this interface directly; instead extend `BasicAnnotationValidator` or one of its subclasses.

## Verschachtelte Klassen - Übersicht

Verschachtelte Klassen
Modifizierer und Typ
Schnittstelle
Beschreibung
`static interface`
`AnnotationValidator.Registry`
A registry from `annotation source` to `AnnotationValidator`.

## Methodenübersicht

Modifizierer und Typ
Methode
Beschreibung
`String`
`getAnnotationSource()`
Returns the `annotation source` of the annotations validated by this annotation validator.
`boolean`
`isValidLocation(Annotation annotation)`
Returns whether this annotation with this annotation validator's `annotation source` is valid at its `current location`.
`boolean`
`validate(Annotation annotation, DiagnosticChain diagnostics, Map<Object,Object> context)`
Returns whether this annotation is valid.

## Methodendetails

### getAnnotationSource

String getAnnotationSource()
Returns the `annotation source` of the annotations validated by this annotation validator.

Gibt zurück:
  the annotation source.

### isValidLocation

boolean isValidLocation(Annotation annotation)
Returns whether this annotation with this annotation validator's `annotation source` is valid at its `current location`.

Parameter:
  `annotation` - the annotation in question.
Gibt zurück:
  whether this annotation with this annotation validator's annotation source is valid at its current location.

### validate

boolean validate(Annotation annotation, DiagnosticChain diagnostics, Map<Object,Object> context)
Returns whether this annotation is valid.

Parameter:
  `annotation` - the annotation in question.
  `diagnostics` - a place to accumulate diagnostics; if it's `null`, no diagnostics should be produced.
  `context` - a place to cache information, if it's `null`, no cache is supported.
Gibt zurück:
  whether this annotation is valid.
Siehe auch:
  - `EObjectValidator.validate(EObject, DiagnosticChain, Map)`