io.sarl.lang.validation.subvalidators
Class SARLModifierValidator
Enclosing class:
SARLFeatureModifierValidator
protected class SARLModifierValidator
extends java.lang.Object
The modifier validator for constructors.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Action Summary
Modifier and type Action and description
protected void checkModifiers(XtendMember,String)
Check the modifiers for the given member.
protected void error(String,EObject,int)
Report an "invalid modifier" error through the associated validator.
protected boolean isPackageByDefault(XtendMember)
Replies if the default visibility modifier for the given member is "package".
protected boolean isPrivateByDefault(XtendMember)
Replies if the default visibility modifier for the given member is "private".
protected boolean isProtectedByDefault(XtendMember)
Replies if the default visibility modifier for the given member is "protected".
protected boolean isPublicByDefault(XtendMember)
Replies if the default visibility modifier for the given member is "public".
protected void issue(String,EObject,int,String,String*)
Report an issue through the associated validator.
protected void unnecessaryModifierIssue(String,String,EObject,int)
Report an issue for unnecessary modifier
Action Details
checkModifiers(XtendMember,String)
protected def checkModifiers(XtendMember,String)
Check the modifiers for the given member.
Parameters:
member - the member to check.
memberName - the name of the member.
error(String,EObject,int)
protected def error(String,EObject,int)
Report an "invalid modifier" error through the associated validator.
Parameters:
message - the error message.
source - the source of the error.
index - the index of the element to which the error is attached.
isPackageByDefault(XtendMember)
protected def isPackageByDefault(XtendMember) : boolean
Replies if the default visibility modifier for the given member is "package". If this function replies true, the "package" modifier is assumed to be the default one for the given member. This function may be used for printing out an "unnecessary modifier" warning when the "package" modifier is explicitly attached to the given member.

This function is defined for being overridden by subclasses.
Parameters:
member - the member to test.
Returns:
true if the "package" modifier is the modifier by default for the given member.
isPrivateByDefault(XtendMember)
protected def isPrivateByDefault(XtendMember) : boolean
Replies if the default visibility modifier for the given member is "private". If this function replies true, the "private" modifier is assumed to be the default one for the given member. This function may be used for printing out an "unnecessary modifier" warning when the "private" modifier is explicitly attached to the given member.

This function is defined for being overridden by subclasses.
Parameters:
member - the member to test.
Returns:
true if the "private" modifier is the modifier by default for the given member.
isProtectedByDefault(XtendMember)
protected def isProtectedByDefault(XtendMember) : boolean
Replies if the default visibility modifier for the given member is "protected". If this function replies true, the "protected" modifier is assumed to be the default one for the given member. This function may be used for printing out an "unnecessary modifier" warning when the "protected" modifier is explicitly attached to the given member.

This function is defined for being overridden by subclasses.
Parameters:
member - the member to test.
Returns:
true if the "protected" modifier is the modifier by default for the given member.
isPublicByDefault(XtendMember)
protected def isPublicByDefault(XtendMember) : boolean
Replies if the default visibility modifier for the given member is "public". If this function replies true, the "public" modifier is assumed to be the default one for the given member. This function may be used for printing out an "unnecessary modifier" warning when the "public" modifier is explicitly attached to the given member.

This function is defined for being overridden by subclasses.
Parameters:
member - the member to test.
Returns:
true if the "public" modifier is the modifier by default for the given member.
issue(String,EObject,int,String,String*)
protected def issue(String,EObject,int,String,String*)
Report an issue through the associated validator.
Parameters:
message - the issue message.
source - the source of the issue.
index - the index of the element to which the issue is attached.
code - the code of the issue.
issueData - data associated to the issue.
unnecessaryModifierIssue(String,String,EObject,int)
protected def unnecessaryModifierIssue(String,String,EObject,int)
Report an issue for unnecessary modifier
Parameters:
modifier - the unnecessary modifier.
memberName - the name of the member to which the unnecessary modifier is attached.
source - the source of the issue.
index - the index of the element to which the issue is attached.