io.sarl.lang.codebuilder.appenders
Class FormalParameterSourceAppender
All Superinterfaces:
IFormalParameterBuilder
class FormalParameterSourceAppender
extends AbstractSourceAppender
implements IFormalParameterBuilder
Appender of a Sarl formal parameter.
Property Summary
Modifier and type Property and description
IExpressionBuilder defaultValue
Replies the default value of the parameter.
SarlFormalParameter sarlFormalParameter
Replies the created parameter.
org.eclipse.xtext.common.types.access.IJvmTypeProvider typeResolutionContext
Field Summary
Constructor Summary
Constructor and description
new(IFormalParameterBuilder)
Action Summary
Modifier and type Action and description
void build(ISourceAppender)
void dispose
Dispose the resource.
void eInit(XtendExecutable,String,IJvmTypeProvider)
Initialize the formal parameter.
org.eclipse.emf.ecore.resource.Resource eResource
Replies the resource to which the formal parameter is attached.
IExpressionBuilder getDefaultValue
Replies the default value of the parameter.
SarlFormalParameter getSarlFormalParameter
Replies the created parameter.
org.eclipse.xtext.common.types.access.IJvmTypeProvider getTypeResolutionContext
org.eclipse.xtext.common.types.JvmParameterizedTypeReference newTypeRef(String)
Find the reference to the type with the given name.
org.eclipse.xtext.common.types.JvmParameterizedTypeReference newTypeRef(Notifier,String)
Find the reference to the type with the given name.
void setParameterType(String)
Change the type.
void setReferenceInto(XFeatureCall)
Replies the JvmIdentifiable that corresponds to the formal parameter.
void setVarArg(boolean)
Change the variadic property of the parameter.
Property Details
defaultValue
val defaultValue : IExpressionBuilder
Replies the default value of the parameter.

This property is an alias for the action: getDefaultValue

Returns:
the default value builder.
sarlFormalParameter
val sarlFormalParameter : SarlFormalParameter
Replies the created parameter.

This property is an alias for the action: getSarlFormalParameter

Returns:
the parameter.
typeResolutionContext
val typeResolutionContext : org.eclipse.xtext.common.types.access.IJvmTypeProvider

This property is an alias for the action: getTypeResolutionContext

Constructor Details
new(IFormalParameterBuilder)
new(IFormalParameterBuilder)
Action Details
build(ISourceAppender)
def build(ISourceAppender)

throws java.io.IOException

dispose
def dispose
Dispose the resource.
eInit(XtendExecutable,String,IJvmTypeProvider)
def eInit(XtendExecutable,String,IJvmTypeProvider)
Initialize the formal parameter.
Parameters:
context - the context of the formal parameter.
name - the name of the formal parameter.
eResource
def eResource : org.eclipse.emf.ecore.resource.Resource
Replies the resource to which the formal parameter is attached.
getDefaultValue
def getDefaultValue : IExpressionBuilder
Replies the default value of the parameter.
Returns:
the default value builder.
getSarlFormalParameter
def getSarlFormalParameter : SarlFormalParameter
Replies the created parameter.
Returns:
the parameter.
getTypeResolutionContext
def getTypeResolutionContext : org.eclipse.xtext.common.types.access.IJvmTypeProvider
newTypeRef(String)
def newTypeRef(String) : org.eclipse.xtext.common.types.JvmParameterizedTypeReference
Find the reference to the type with the given name.
Parameters:
typeName - the fully qualified name of the type
Returns:
the type reference.
newTypeRef(Notifier,String)
def newTypeRef(Notifier,String) : org.eclipse.xtext.common.types.JvmParameterizedTypeReference
Find the reference to the type with the given name.
Parameters:
context - the context for the type reference use
typeName - the fully qualified name of the type
Returns:
the type reference.
setParameterType(String)
def setParameterType(String)
Change the type.
Parameters:
type - the formal parameter type.
setReferenceInto(XFeatureCall)
def setReferenceInto(XFeatureCall)
Replies the JvmIdentifiable that corresponds to the formal parameter.
Parameters:
container - the feature call that is supposed to contains the replied identifiable element.
setVarArg(boolean)
def setVarArg(boolean)
Change the variadic property of the parameter.
Parameters:
isVariadic - indicates if the parameter is variadic.