io.sarl.lang.extralanguage.compiler
Class FeaturePattern
class FeaturePattern
extends java.lang.Object
Feature pattern.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.6
Field Summary
Modifier and type Field and description
public static val char ALL_PATTERN_CHAR
Character that is representing all the patterns.
Constructor Summary
Constructor and description
new(String)
Constructor.
Action Summary
Modifier and type Action and description
boolean isNameReplacement
Replies if this pattern is only for a simple name replacement.
boolean matches(Deque<E>)
Replies if the pattern matches the given identifier.
static java.lang.String simpleName(String)
Replies the simple name of the feature from the given textual representation.
java.lang.String toString
Field Details
ALL_PATTERN_CHAR
public static val ALL_PATTERN_CHAR : char = *
Character that is representing all the patterns.
Constructor Details
new(String)
new(String)
Constructor.

The general format of the textual representation is:
br [path/]featureIdentifierbr 
The featureIdentifier is the identifier of the feature. The path is a sequence of type identifiers or field names.

The special character * may be used for specifying "anything".
Parameters:
specification - the textual representation of the pattern.
Action Details
isNameReplacement
def isNameReplacement : boolean
Replies if this pattern is only for a simple name replacement.
Returns:
true if the pattern corresponds to a simple name only.
matches(Deque<E>)
def matches(Deque<E>) : boolean
Replies if the pattern matches the given identifier.
Parameters:
feature - the feature to test.
Returns:
true if the pattern matches.
simpleName(String)
def simpleName(String) : java.lang.String
Replies the simple name of the feature from the given textual representation.
Parameters:
textualRepresentation - the textual representation.
Returns:
the simple name.
toString
def toString : java.lang.String