io.sarl.lang.sarl.actionprototype
Interface FormalParameterProvider
interface FormalParameterProvider
An object able to provide the name and the type of a formal parameter.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Property Summary
Modifier and type Property and description
int formalParameterCount
Replies the number of formal parameters.
Action Summary
Modifier and type Action and description
abstract org.eclipse.emf.ecore.EObject getFormalParameter(int)
Replies the formal parameter at the given position.
abstract int getFormalParameterCount
Replies the number of formal parameters.
abstract org.eclipse.xtext.xbase.XExpression getFormalParameterDefaultValue(int)
Replies the default value of the formal parameter at the given position.
abstract java.lang.String getFormalParameterDefaultValueString(int)
Replies the default value of the formal parameter at the given position.
abstract java.lang.String getFormalParameterName(int)
Replies the name of the formal parameter at the given position.
abstract java.lang.String getFormalParameterType(int,boolean)
Replies the type of the formal parameter at the given position.
abstract org.eclipse.xtext.common.types.JvmTypeReference getFormalParameterTypeReference(int,boolean)
Replies the type of the formal parameter at the given position.
abstract boolean hasFormalParameterDefaultValue(int)
Replies if the formal parameter at the given position has a default value.
Property Details
formalParameterCount
val formalParameterCount : int
Replies the number of formal parameters.

This property is an alias for the action: getFormalParameterCount

Returns:
the number of formal parameters.
Action Details
getFormalParameter(int)
def getFormalParameter(int) : org.eclipse.emf.ecore.EObject
Replies the formal parameter at the given position.
Parameters:
position - the position of the formal parameter.
Returns:
the formal parameter
getFormalParameterCount
def getFormalParameterCount : int
Replies the number of formal parameters.
Returns:
the number of formal parameters.
getFormalParameterDefaultValue(int)
def getFormalParameterDefaultValue(int) : org.eclipse.xtext.xbase.XExpression
Replies the default value of the formal parameter at the given position.

This function replies the Xbase expression for the default value.

If this function replies null, the string representation of the default value may be still available. See getFormalParameterDefaultValueString(int).
Parameters:
position - the position of the formal parameter.
Returns:
the default value, or null if none.
See:
getFormalParameterDefaultValueString(int)
getFormalParameterDefaultValueString(int)
def getFormalParameterDefaultValueString(int) : java.lang.String
Replies the default value of the formal parameter at the given position.

This function replies the string representation of the default value.

If this function replies null or an empty string of characters, the Xbase representation of the default value may be still available. See getFormalParameterDefaultValue(int).
Parameters:
position - the position of the formal parameter.
Returns:
the default value, or null if none.
See:
getFormalParameterDefaultValue(int)
getFormalParameterName(int)
def getFormalParameterName(int) : java.lang.String
Replies the name of the formal parameter at the given position.
Parameters:
position - the position of the formal parameter.
Returns:
the name of the formal parameter.
getFormalParameterType(int,boolean)
def getFormalParameterType(int,boolean) : java.lang.String
Replies the type of the formal parameter at the given position.
Parameters:
position - the position of the formal parameter.
isVarargs - indicates if the parameter should be considered as a vararg parameter.
Returns:
the type of the formal parameter.
getFormalParameterTypeReference(int,boolean)
def getFormalParameterTypeReference(int,boolean) : org.eclipse.xtext.common.types.JvmTypeReference
Replies the type of the formal parameter at the given position.
Parameters:
position - the position of the formal parameter.
isVarargs - indicates if the parameter should be considered as a vararg parameter.
Returns:
the type of the formal parameter.
hasFormalParameterDefaultValue(int)
def hasFormalParameterDefaultValue(int) : boolean
Replies if the formal parameter at the given position has a default value.
Parameters:
position - the position of the formal parameter.
Returns:
true if the parameter has a default value, false if not.