Class BasicAnnotationValidator

java.lang.Object
org.eclipse.emf.cdo.etypes.util.BasicAnnotationValidator
All Implemented Interfaces:
AnnotationValidator

public abstract class BasicAnnotationValidator extends Object implements AnnotationValidator
A basic implementation of an annotation validator.

An implementation must specialize the getResourceLocator() method in order for the getValidLocationDescription() method to function correctly. The most straight-forward way to implement an annotation validator is to model the supported keys, specializing getPropertyClasses(ModelElement) with one or more classes that can be instantiated to represent the information in the annotation. These classes are used to induce a mapping of keys onto the underlying annotation model's features. If the annotation model includes references, validateReferenceDetailValueLiteral and convertPropertyReferenceValueToLiteralItem(EObject, EReference, Object) must also be specialized. Alternatively an implementation can specialize validateDetail(Annotation, ModelElement, Map.Entry, DiagnosticChain, Map) without providing a modeled representation. The annotation validator's assistant is especially useful for inducing a user interface based on the modeled annotation representation.

Since:
4.22
See Also: