io.sarl.lang.validation.subvalidators
Class SARLAnnotationValidator
All Superinterfaces:
org.eclipse.emf.ecore.EValidator, org.eclipse.xtext.validation.ValidationMessageAcceptor
class SARLAnnotationValidator
extends AbstractSARLSubValidatorWithParentLink
An implementation of a validator to deal with annotations.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.14
Property Summary
Field Summary
Modifier and type Field and description
protected val com.google.common.collect.Multimap<K,V> targetInfos
Information about that annotation targets.
Constructor Summary
Constructor and description
new
Action Summary
Modifier and type Action and description
void checkAnnotationTarget(XAnnotation)
void checkDefaultSkillAnnotation(SarlCapacity)
Check the correct usage of the io.sarl.lang.core.DefaultSkill annotation.
void checkManualInlineDefinition(XtendAnnotationTarget)
Check for @Inline annotation usage.
void checkMultipleAnnotations(XtendAnnotationTarget)
void checkProgrammaticIssueMessage(XAbstractFeatureCall)
Check if element has an programmatic issue message.
void checkReservedAnnotation(XtendAnnotationTarget)
Check for reserved annotations.
protected boolean isAOActiveAnnotation(XAnnotation)
Replies if the given container can receive an active annotation.
protected boolean isAOActiveAnnotationReceiver(XtendTypeDeclaration)
Replies if the given annotation is an active annotation for agent-oriented elements.
protected boolean isOOActiveAnnotation(XAnnotation)
Replies if the given annotation is an active annotation for object-oriented elements.
protected boolean isOOType(XtendTypeDeclaration)
Replies if the given element is an object oriented type.
Field Details
targetInfos
protected val targetInfos : com.google.common.collect.Multimap<K,V>
Information about that annotation targets.
Constructor Details
new
new
Action Details
checkAnnotationTarget(XAnnotation)
def checkAnnotationTarget(XAnnotation)
checkDefaultSkillAnnotation(SarlCapacity)
def checkDefaultSkillAnnotation(SarlCapacity)
Check the correct usage of the io.sarl.lang.core.DefaultSkill annotation.
Parameters:
capacity - the associated capacity to check.
checkManualInlineDefinition(XtendAnnotationTarget)
def checkManualInlineDefinition(XtendAnnotationTarget)
Check for @Inline annotation usage.
Parameters:
annotationTarget - thee target to test.
checkMultipleAnnotations(XtendAnnotationTarget)
def checkMultipleAnnotations(XtendAnnotationTarget)
checkProgrammaticIssueMessage(XAbstractFeatureCall)
def checkProgrammaticIssueMessage(XAbstractFeatureCall)
Check if element has an programmatic issue message.
Parameters:
expression - the expression.
Since:
0.12
checkReservedAnnotation(XtendAnnotationTarget)
def checkReservedAnnotation(XtendAnnotationTarget)
Check for reserved annotations.
Parameters:
annotationTarget - thee target to test.
isAOActiveAnnotation(XAnnotation)
protected def isAOActiveAnnotation(XAnnotation) : boolean
Replies if the given container can receive an active annotation.
Parameters:
annotation - the annotation.
Returns:
true if the annotation should be used only for OO elements.
See:
isOOActiveAnnotation(XAnnotation) , isAOActiveAnnotationReceiver(XtendTypeDeclaration)
isAOActiveAnnotationReceiver(XtendTypeDeclaration)
protected def isAOActiveAnnotationReceiver(XtendTypeDeclaration) : boolean
Replies if the given annotation is an active annotation for agent-oriented elements.
Parameters:
container - the container to test.
Returns:
true if the container could receive an active annotation.
See:
isOOActiveAnnotation(XAnnotation) , isAOActiveAnnotation(XAnnotation)
isOOActiveAnnotation(XAnnotation)
protected def isOOActiveAnnotation(XAnnotation) : boolean
Replies if the given annotation is an active annotation for object-oriented elements.
Parameters:
annotation - the annotation.
Returns:
true if the annotation should be used only for OO elements.
See:
isAOActiveAnnotation(XAnnotation)
isOOType(XtendTypeDeclaration)
protected def isOOType(XtendTypeDeclaration) : boolean
Replies if the given element is an object oriented type.
Parameters:
type - the type to test.
Returns:
true if the type is an object oriented type.