io.sarl.lang.extralanguage.compiler
Class FeatureReplacement
class FeatureReplacement
extends java.lang.Object
Feature replacement.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.6
Property Summary
Modifier and type Property and description
java.lang.String text
Replies the raw text for this replacement.
Constructor Summary
Constructor and description
new(String)
Constructor.
Action Summary
Modifier and type Action and description
java.lang.String getText
Replies the raw text for this replacement.
boolean hasReplacement
Replies if a replacement is defined.
io.sarl.lang.extralanguage.compiler.ConversionResult replace(JvmIdentifiableElement,List<E>,List<E>,List<E>)
Do the replacement.
java.lang.String toString
Property Details
text
val text : java.lang.String
Replies the raw text for this replacement.

This property is an alias for the action: getText

Returns:
the replacement text.
Constructor Details
new(String)
new(String)
Constructor.

The general format of the textual representation may contains:
  • $0 for the receiver.
  • $n for the n-th argument.
  • $* all the arguments.
Parameters:
specification - the textual representation of the pattern.
Action Details
getText
def getText : java.lang.String
Replies the raw text for this replacement.
Returns:
the replacement text.
hasReplacement
def hasReplacement : boolean
Replies if a replacement is defined.
Returns:
true if a replacement is defined.
replace(JvmIdentifiableElement,List<E>,List<E>,List<E>)
def replace(JvmIdentifiableElement,List<E>,List<E>,List<E>) : io.sarl.lang.extralanguage.compiler.ConversionResult
Do the replacement.
Parameters:
calledFeature - the called feature.
leftOperand - the description of the elements into the left operand (usually, before assignment sign).
receiver - the description of the receiver, i.e. the object on which the feature is called.
arguments - the list of the arguments.
Returns:
the new simple name, or null if the equivalent function not exists, or simpleName if the function name should stay unchanged.
toString
def toString : java.lang.String