Modifier and type | Type and description |
---|---|
protected class | SARLValidator.SARLModifierValidator The modifier validator for constructors. |
Modifier and type | Action and description |
---|---|
protected java.lang.String | canonicalName(EObject) Replies the canonical name of the given object. |
void | checkAbstract(XtendFunction) Check for abstract methods. |
void | checkActionFires(SarlAction) Check the types of the parameters of the "fires" statement. |
void | checkActionName(SarlAction) Check if the given action has a valid name. |
void | checkAmbiguousInterpretationMinusUnaryOperator(XUnaryOperation) Check if the call to an unary minus operator may be ambiguous interpretation for the SARL developper. |
void | checkAnnotationTarget(XAnnotation) |
void | checkArtifactUse(SarlArtifact) Artifact keyword is reserved. |
void | checkAssertKeywordUse(SarlAssertExpression) Check for usage of assert keyword. |
protected void | checkAssignment(XExpression,EStructuralFeature,boolean) |
void | checkAssumeKeywordUse(SarlAssertExpression) Check for usage of assert keyword. |
void | checkBehaviorUnitEventType(SarlBehaviorUnit) Check if the parameter of the bahavior unit is an event. |
void | checkBehaviorUnitGuardType(SarlBehaviorUnit) Check the type of the behavior unit's guard. |
void | checkBreakKeywordUse(SarlBreakExpression) Check for usage of break inside loops. |
void | checkCapacityFeatures(SarlCapacity) Check if a capacity has a feature defined inside. |
void | checkCapacityTypeForUses(SarlCapacityUses) Check the type of the capacity uses. |
protected void | checkCast(JvmTypeReference,LightweightTypeReference,LightweightTypeReference) |
void | checkCasts(XCastedExpression) |
void | checkClassPath(XtendFile) Check if the correct SARL libraries are on the classpath. |
void | checkContainerType(SarlAgent) Check the container for the SARL agents. |
void | checkContainerType(SarlBehavior) Check the container for the SARL behaviors. |
void | checkContainerType(SarlCapacity) Check the container for the SARL capacities. |
void | checkContainerType(SarlEvent) Check if the modifiers for the SARL events. |
void | checkContainerType(SarlSkill) Check the container for the SARL skills. |
void | checkContinueKeywordUse(SarlContinueExpression) Check for usage of continue inside loops. |
void | checkDefaultSkillAnnotation(SarlCapacity) Check the correct usage of the io.sarl.lang.core.DefaultSkill annotation. |
void | checkDefaultSuperConstructor(XtendClass) Check if the super default constructor is correctly invoked. |
void | checkDefaultValueFinalFieldReferenceInConstructor(SarlFormalParameter) Check if the default values have valid references to read-only fields from constructors. |
void | checkDefaultValuePureExpression(SarlFormalParameter) Check if the default values have not a reference to a not-pure operation. |
void | checkDefaultValueRedefinition(SarlFormalParameter) Check if the default value expression is redefined from an inherited definition. |
void | checkDefaultValueTypeCompatibleWithParameterType(SarlFormalParameter) Check if the default values of the formal parameters have a compatible type with the formal parameter. |
void | checkDiscouragedCalls(XAbstractFeatureCall) Check if the call is discouraged. |
void | checkEarlyExitEventInFires(SarlAction) Emit a warning when the events after the "fires" keyword are not early-exit events. |
void | checkFieldName(SarlField) Check if the given field has a valid name. |
void | checkFieldNameShadowing(SarlField) Check if the given field has a name that is shadowing an inherited field. |
void | checkFinalFieldInitialization(SarlAgent) Check if all the fields are initialized in a SARL agent. |
void | checkFinalFieldInitialization(SarlBehavior) Check if all the fields are initialized in a SARL behavior. |
void | checkFinalFieldInitialization(SarlEvent) Check if all the fields are initialized in a SARL event. |
void | checkFinalFieldInitialization(SarlSkill) Check if all the fields are initialized in a SARL skill. |
void | checkForbiddenCalls(XAbstractFeatureCall) Check if the call is forbidden. |
void | checkGenericTypeNameShadowing(JvmTypeParameter) Check if the given generic type has a name that is shadowing an enclosing generic type. |
protected boolean | checkImplementedTypes(XtendTypeDeclaration,EReference,List<E>,Class<T>,int,boolean) Check the implemented type. |
protected void | checkInferedApi(XtendField) |
protected void | checkInferedApi(XtendFunction) |
void | checkLocalUsageOfDeclaredXtendFunction(XtendFunction) |
void | checkManualInlineDefinition(XtendAnnotationTarget) Check for @Inline annotation usage. |
protected void | checkModifiers(SarlAgent) Check the modifiers for the SARL agents. |
protected void | checkModifiers(SarlBehavior) Check the modifiers for the SARL behaviors. |
protected void | checkModifiers(SarlCapacity) Check the modifiers for the SARL capacities. |
protected void | checkModifiers(SarlEvent) Check if the modifiers for the SARL events. |
protected void | checkModifiers(SarlSkill) Check the modifiers for the SARL skills. |
protected void | checkModifiers(XtendAnnotationType) |
protected void | checkModifiers(XtendClass) |
protected void | checkModifiers(XtendConstructor) |
protected void | checkModifiers(XtendEnum) |
protected void | checkModifiers(XtendField) |
protected void | checkModifiers(XtendFunction) |
protected void | checkModifiers(XtendInterface) |
void | checkMultipleCapacityUses(SarlCapacityUses) Check for multiple capacity use declaration. |
protected boolean | checkOverrideableCasts(SarlCastedExpression) Check if the given cast expression has an associated overriding function. |
void | checkParameterName(SarlFormalParameter) Check if the given parameter has a valid name. |
void | checkParameterName(XClosure) Check if the closure parameters have a valid name. |
void | checkProgrammaticIssueMessage(XAbstractFeatureCall) Check if element has an programmatic issue message. |
void | checkRedundantImplementedInterfaces(SarlClass) Check if implemented interfaces of a Xtend Class are redundant. |
void | checkRedundantImplementedInterfaces(SarlInterface) Check if implemented interfaces of a Xtend Interface are redundant. |
void | checkRedundantImplementedInterfaces(SarlSkill) Check if implemented interfaces of a skill are redundant. |
void | checkRequiredCapacityUse(SarlRequiredCapacity) Emit a warning when the "requires" keyword is used. |
void | checkReservedAnnotation(XtendAnnotationTarget) Check for reserved annotations. |
void | checkSpaceUse(SarlSpace) Space keyword is reserved. |
void | checkStaticConstructorPrototype(XtendConstructor) Check for a valid prototype of a static constructor. |
void | checkSuperConstructor(SarlAgent) Check if the super default constructor is correctly invoked. |
void | checkSuperConstructor(SarlBehavior) Check if the super default constructor is correctly invoked. |
void | checkSuperConstructor(SarlEvent) Check if the super default constructor is correctly invoked. |
void | checkSuperConstructor(SarlSkill) Check if the super default constructor is correctly invoked. |
protected void | checkSuperConstructor(XtendTypeDeclaration,EStructuralFeature,Collection<E>) Check the super constructors. |
void | checkSuperType(SarlAgent) Check if the supertype of the given agent is a subtype of Agent. |
void | checkSuperType(SarlBehavior) Check if the supertype of the given behavior is a subtype of Behavior. |
void | checkSuperType(SarlEvent) Check if the supertype of the given event is a subtype of Event. |
void | checkSuperType(SarlSkill) Check if the supertype of the given skill is a subtype of Skill. |
void | checkSuperTypes(SarlCapacity) Check if the supertype of the given capacity is a subtype of Capacity. |
protected int | checkSuperTypes(XtendTypeDeclaration,EReference,List<E>,Class<T>,boolean) Check the super type. |
void | checkTopElementsAreUnique(SarlScript) Check the top elements within a script are not duplicated. |
void | checkUnmodifiableEventAccess(SarlBehaviorUnit) Check for usage of the event functions in the behavior units. |
void | checkUnsynchronizedField(XtendField) Check if a field needs to be synchronized. |
void | checkUnusedCapacities(SarlCapacityUses) Check for unused capacities. |
void | checkVariableName(XVariableDeclaration) Check if the given local variable has a valid name. |
protected void | doCheckFunctionOverrides(EObject,IResolvedOperation,List<E>) Caution: This function is overridden for translating the MISSING_OVERRIDE error into a warning, and emit a warning when a return type should be specified. |
protected org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference | getExpectedType(XExpression) |
protected org.eclipse.xtext.validation.IssueSeverities | getIssueSeverities(Map<K,V>,EObject) |
protected java.util.List<E> | getParamTypeReferences(JvmExecutable,boolean,boolean) Retrieve the types of the formal parameters of the given JVM executable object. |
protected static org.eclipse.xtext.xbase.XMemberFeatureCall | getRootOfMemberFeatureCallSequence(EObject,EObject,Procedure1<Param>) Replies the member feature call that is the root of a sequence of member feature calls. |
protected boolean | isAmbiguousCastContext(JvmTypeReference,LightweightTypeReference,LightweightTypeReference) Test if the enclosing cast expression is unsed in an context that make the casting operation mandatory in order to avoid ambiguity. |
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 | isAOConstructorContainer(XtendTypeDeclaration) Replies if the given type is an agent-oriented type that could receives a constructor declaration. |
protected boolean | isDefaultValuedParameterFunction(XtendFunction) Replies if the given function has a default value for one of its parameters. |
protected boolean | isForbiddenActiveAnnotation(XAnnotation) Replies if the given annotation is a forbidden active annotation. |
protected boolean | isIgnored(String,EObject) Replies if the given issue is ignored for the given object. |
protected boolean | isInitialized(JvmField) |
protected boolean | isLocallyAssigned(EObject,EObject) Replies if the given object is locally assigned. |
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. |
protected boolean | isTypeFreeExpression(XExpression) Replies if the given expression has no specific type. |
protected boolean | isValueExpectedRecursive(XExpression) |
protected void | reportCastWarnings(JvmTypeReference,LightweightTypeReference,LightweightTypeReference) Report the warnings associated to the casted expressions. |
protected org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference | toLightweightTypeReference(JvmType,EObject) Create a lightweight type reference from the given type. |
protected void | validateInferredType(JvmTypeReference,XtendMember,String,EAttribute) This function is overridden in order to add "isIgnore" invocation. |
new
protected def canonicalName(EObject) : java.lang.String
def checkAbstract(XtendFunction)
def checkActionFires(SarlAction)
def checkActionName(SarlAction)
def checkAmbiguousInterpretationMinusUnaryOperator(XUnaryOperation)
-125.abs
that is invoking the function Math.abs
with extension method notation. According to the precedence of the the SARL operator, this expression is interpreted as -abs(125)
and not abs(-125)
. Indeed the minus sign is an operator and not considered as a part of the number literal itself.
To avoid invalid interpretation of the expression by the SARL developper, a warning is generated.
def checkAnnotationTarget(XAnnotation)
def checkArtifactUse(SarlArtifact)
def checkAssertKeywordUse(SarlAssertExpression)
protected def checkAssignment(XExpression,EStructuralFeature,boolean)
def checkAssumeKeywordUse(SarlAssertExpression)
def checkBehaviorUnitEventType(SarlBehaviorUnit)
def checkBehaviorUnitGuardType(SarlBehaviorUnit)
def checkBreakKeywordUse(SarlBreakExpression)
def checkCapacityFeatures(SarlCapacity)
def checkCapacityTypeForUses(SarlCapacityUses)
protected def checkCast(JvmTypeReference,LightweightTypeReference,LightweightTypeReference)
def checkCasts(XCastedExpression)
def checkClassPath(XtendFile)
def checkContainerType(SarlAgent)
def checkContainerType(SarlBehavior)
def checkContainerType(SarlCapacity)
def checkContainerType(SarlEvent)
def checkContainerType(SarlSkill)
def checkContinueKeywordUse(SarlContinueExpression)
def checkDefaultSkillAnnotation(SarlCapacity)
def checkDefaultSuperConstructor(XtendClass)
def checkDefaultValueFinalFieldReferenceInConstructor(SarlFormalParameter)
def checkDefaultValuePureExpression(SarlFormalParameter)
def checkDefaultValueRedefinition(SarlFormalParameter)
def checkDefaultValueTypeCompatibleWithParameterType(SarlFormalParameter)
def checkDiscouragedCalls(XAbstractFeatureCall)
def checkEarlyExitEventInFires(SarlAction)
def checkFieldName(SarlField)
def checkFieldNameShadowing(SarlField)
def checkFinalFieldInitialization(SarlAgent)
def checkFinalFieldInitialization(SarlBehavior)
def checkFinalFieldInitialization(SarlEvent)
def checkFinalFieldInitialization(SarlSkill)
def checkForbiddenCalls(XAbstractFeatureCall)
def checkGenericTypeNameShadowing(JvmTypeParameter)
protected def checkImplementedTypes(XtendTypeDeclaration,EReference,List<E>,Class<T>,int,boolean) : boolean
protected def checkInferedApi(XtendField)
protected def checkInferedApi(XtendFunction)
def checkLocalUsageOfDeclaredXtendFunction(XtendFunction)
def checkManualInlineDefinition(XtendAnnotationTarget)
@Inline
annotation usage.
protected def checkModifiers(SarlAgent)
protected def checkModifiers(SarlBehavior)
protected def checkModifiers(SarlCapacity)
protected def checkModifiers(SarlEvent)
protected def checkModifiers(SarlSkill)
protected def checkModifiers(XtendAnnotationType)
protected def checkModifiers(XtendClass)
protected def checkModifiers(XtendConstructor)
protected def checkModifiers(XtendEnum)
protected def checkModifiers(XtendField)
protected def checkModifiers(XtendFunction)
protected def checkModifiers(XtendInterface)
def checkMultipleCapacityUses(SarlCapacityUses)
protected def checkOverrideableCasts(SarlCastedExpression) : boolean
def checkParameterName(SarlFormalParameter)
def checkParameterName(XClosure)
def checkProgrammaticIssueMessage(XAbstractFeatureCall)
def checkRedundantImplementedInterfaces(SarlClass)
def checkRedundantImplementedInterfaces(SarlInterface)
def checkRedundantImplementedInterfaces(SarlSkill)
def checkRequiredCapacityUse(SarlRequiredCapacity)
def checkReservedAnnotation(XtendAnnotationTarget)
def checkSpaceUse(SarlSpace)
def checkStaticConstructorPrototype(XtendConstructor)
def checkSuperConstructor(SarlAgent)
def checkSuperConstructor(SarlBehavior)
def checkSuperConstructor(SarlEvent)
def checkSuperConstructor(SarlSkill)
protected def checkSuperConstructor(XtendTypeDeclaration,EStructuralFeature,Collection<E>)
def checkSuperType(SarlAgent)
def checkSuperType(SarlBehavior)
def checkSuperType(SarlEvent)
def checkSuperType(SarlSkill)
def checkSuperTypes(SarlCapacity)
protected def checkSuperTypes(XtendTypeDeclaration,EReference,List<E>,Class<T>,boolean) : int
def checkTopElementsAreUnique(SarlScript)
def checkUnmodifiableEventAccess(SarlBehaviorUnit)
def checkUnsynchronizedField(XtendField)
def checkUnusedCapacities(SarlCapacityUses)
def checkVariableName(XVariableDeclaration)
protected def doCheckFunctionOverrides(EObject,IResolvedOperation,List<E>)
protected def getExpectedType(XExpression) : org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
protected def getIssueSeverities(Map<K,V>,EObject) : org.eclipse.xtext.validation.IssueSeverities
protected def getParamTypeReferences(JvmExecutable,boolean,boolean) : java.util.List<E>
protected def getRootOfMemberFeatureCallSequence(EObject,EObject,Procedure1<Param>) : org.eclipse.xtext.xbase.XMemberFeatureCall
protected def isAmbiguousCastContext(JvmTypeReference,LightweightTypeReference,LightweightTypeReference) : boolean
protected def isAOActiveAnnotation(XAnnotation) : boolean
protected def isAOActiveAnnotationReceiver(XtendTypeDeclaration) : boolean
protected def isAOConstructorContainer(XtendTypeDeclaration) : boolean
protected def isDefaultValuedParameterFunction(XtendFunction) : boolean
protected def isForbiddenActiveAnnotation(XAnnotation) : boolean
protected def isIgnored(String,EObject) : boolean
protected def isInitialized(JvmField) : boolean
protected def isLocallyAssigned(EObject,EObject) : boolean
protected def isOOActiveAnnotation(XAnnotation) : boolean
protected def isOOType(XtendTypeDeclaration) : boolean
protected def isTypeFreeExpression(XExpression) : boolean
protected def isValueExpectedRecursive(XExpression) : boolean
protected def reportCastWarnings(JvmTypeReference,LightweightTypeReference,LightweightTypeReference)
protected def toLightweightTypeReference(JvmType,EObject) : org.eclipse.xtext.xbase.typesystem.references.LightweightTypeReference
protected def validateInferredType(JvmTypeReference,XtendMember,String,EAttribute)