io.sarl.lang.extralanguage.compiler
Class FeatureCallGenerator
All Known Subclasses:
PyFeatureCallGenerator
Enclosing class:
AbstractExpressionGenerator
protected abstract class FeatureCallGenerator
extends java.lang.Object
A specific feature call generator.

Thus generator should be overriden in order to provide specific language implementation.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Field Summary
Modifier and type Field and description
protected val ExtraLanguageAppendable codeReceiver
Receiver of code.
protected val IExtraLanguageGeneratorContext context
Generation context.
Constructor Summary
Constructor and description
new(IExtraLanguageGeneratorContext,ExtraLanguageAppendable)
Constructor.
Action Summary
Modifier and type Action and description
protected abstract void appendCall(JvmIdentifiableElement,List<E>,List<E>,String,List<E>,Function0<Result>)
Invoked to generate a feature call.
void generate(XAbstractFeatureCall)
Generate a feature call.
void generate(XConstructorCall)
Generate a constructor call.
Field Details
codeReceiver
protected val codeReceiver : ExtraLanguageAppendable
Receiver of code.
context
protected val context : IExtraLanguageGeneratorContext
Generation context.
Constructor Details
new(IExtraLanguageGeneratorContext,ExtraLanguageAppendable)
protected new(IExtraLanguageGeneratorContext,ExtraLanguageAppendable)
Constructor.
Parameters:
context - the generation context.
codeReceiver - the receiver for the target language code.
Action Details
appendCall(JvmIdentifiableElement,List<E>,List<E>,String,List<E>,Function0<Result>)
protected def appendCall(JvmIdentifiableElement,List<E>,List<E>,String,List<E>,Function0<Result>)
Invoked to generate a feature call.

The given values to the arguments are already converter by the ExtraLanguageFeatureNameConverter.
Parameters:
calledFeature - the called feature.
leftOperand - the elements to put consider as left operand of an assignment.
receiver - the receiver of the call.
name - the name of the called feature.
args - the arguments.
beginOfBlock - the expression to be tested at beginning of the block. It should be a "if EXPR not not".
generate(XAbstractFeatureCall)
def generate(XAbstractFeatureCall)
Generate a feature call.
Parameters:
expr - the call expression.
generate(XConstructorCall)
def generate(XConstructorCall)
Generate a constructor call.
Parameters:
expr - the call expression.