io.sarl.lang.codebuilder.appenders
Class FormalParameterSourceAppender
All Superinterfaces:
IFormalParameterBuilder
class FormalParameterSourceAppender
extends AbstractSourceAppender
implements IFormalParameterBuilder
Appender of a Sarl formal parameter.
See:
"FormalParameterBuilderFragment.java : appendTo : 177"
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
Replies the context for type resolution.
Field Summary
Constructor Summary
Constructor and description
new(IFormalParameterBuilder)
Action Summary
Modifier and type Action and description
void build(ISourceAppender)
Fill the given receiver with the serialization of the element that is associated to this appender.
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
Replies the context for type resolution.
org.eclipse.xtext.common.types.JvmTypeReference newTypeRef(String)
Find the reference to the type with the given name.
org.eclipse.xtext.common.types.JvmTypeReference newTypeRef(Class<T>,JvmTypeReference*)
Find the reference to the type with the given type parameters.
org.eclipse.xtext.common.types.JvmTypeReference newTypeRef(Notifier,String)
Find the reference to the type with the given name.
org.eclipse.xtext.common.types.JvmTypeReference newTypeRef(JvmType,JvmTypeReference*)
Find the reference to the type with the given type parameters.
org.eclipse.xtext.common.types.JvmTypeReference newTypeRef(Notifier,Class<T>,JvmTypeReference*)
Find the reference to the type with the given type parameters.
IFormalParameterBuilder setExtension(boolean)
Change the extension flag of the parameter.
IFormalParameterBuilder setParameterType(String)
Change the type.
IFormalParameterBuilder setParameterType(JvmTypeReference)
Change the type.
IFormalParameterBuilder setReferenceInto(XFeatureCall)
Add a reference to this formal parameter in the given container.
IFormalParameterBuilder 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.
See:
"FormalParameterBuilderFragment.java : appendTo : 825"
sarlFormalParameter
val sarlFormalParameter : SarlFormalParameter
Replies the created parameter.

This property is an alias for the action: getSarlFormalParameter

Returns:
the parameter.
See:
"FormalParameterBuilderFragment.java : appendTo : 514"
typeResolutionContext
val typeResolutionContext : org.eclipse.xtext.common.types.access.IJvmTypeProvider
Replies the context for type resolution.

This property is an alias for the action: getTypeResolutionContext

Returns:
the context or null if the Ecore object is the context.
See:
"FormalParameterBuilderFragment.java : appendTo : 440"
Constructor Details
new(IFormalParameterBuilder)
new(IFormalParameterBuilder)
Action Details
build(ISourceAppender)
def build(ISourceAppender)

throws java.io.IOException

Fill the given receiver with the serialization of the element that is associated to this appender.
Parameters:
appender - the receiver of the source code.
Throws exception:
  • java.io.IOException: if there is error during the serialization.
See:
"AbstractSubCodeBuilderFragment.java : appendTo : 550"
dispose
def dispose
Dispose the resource.
See:
"FormalParameterBuilderFragment.java : appendTo : 923"
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.
typeContext - the context for type resolution.
See:
"FormalParameterBuilderFragment.java : appendTo : 461"
eResource
def eResource : org.eclipse.emf.ecore.resource.Resource
Replies the resource to which the formal parameter is attached.
See:
"FormalParameterBuilderFragment.java : appendTo : 619"
getDefaultValue
def getDefaultValue : IExpressionBuilder
Replies the default value of the parameter.
Returns:
the default value builder.
See:
"FormalParameterBuilderFragment.java : appendTo : 825"
getSarlFormalParameter
def getSarlFormalParameter : SarlFormalParameter
Replies the created parameter.
Returns:
the parameter.
See:
"FormalParameterBuilderFragment.java : appendTo : 514"
getTypeResolutionContext
def getTypeResolutionContext : org.eclipse.xtext.common.types.access.IJvmTypeProvider
Replies the context for type resolution.
Returns:
the context or null if the Ecore object is the context.
See:
"FormalParameterBuilderFragment.java : appendTo : 440"
newTypeRef(String)
def newTypeRef(String) : org.eclipse.xtext.common.types.JvmTypeReference
Find the reference to the type with the given name.
Parameters:
typeName - the fully qualified name of the type
Returns:
the type reference.
See:
"FormalParameterBuilderFragment.java : appendTo : 271"
newTypeRef(Class<T>,JvmTypeReference*)
def newTypeRef(Class<T>,JvmTypeReference*) : org.eclipse.xtext.common.types.JvmTypeReference
Find the reference to the type with the given type parameters.
Parameters:
type - the type to reference
args - the type parameters to add to the to reference to the given type
Returns:
the type reference.
See:
"FormalParameterBuilderFragment.java : appendTo : 361"
newTypeRef(Notifier,String)
def newTypeRef(Notifier,String) : org.eclipse.xtext.common.types.JvmTypeReference
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.
See:
"FormalParameterBuilderFragment.java : appendTo : 299"
newTypeRef(JvmType,JvmTypeReference*)
def newTypeRef(JvmType,JvmTypeReference*) : org.eclipse.xtext.common.types.JvmTypeReference
Find the reference to the type with the given type parameters.
Parameters:
type - the type to reference
args - the type parameters to add to the to reference to the given type
Returns:
the type reference.
See:
"FormalParameterBuilderFragment.java : appendTo : 329"
newTypeRef(Notifier,Class<T>,JvmTypeReference*)
def newTypeRef(Notifier,Class<T>,JvmTypeReference*) : org.eclipse.xtext.common.types.JvmTypeReference
Find the reference to the type with the given type parameters.
Parameters:
context - the context in which the type is defined
type - the type to reference
args - the type parameters to add to the to reference to the given type
Returns:
the type reference.
See:
"FormalParameterBuilderFragment.java : appendTo : 395"
setExtension(boolean)
def setExtension(boolean) : IFormalParameterBuilder
Change the extension flag of the parameter.
Parameters:
isExtension - indicates if the parameter is defined as an extension.
Returns:
this
See:
"FormalParameterBuilderFragment.java : appendTo : 789"
setParameterType(String)
def setParameterType(String) : IFormalParameterBuilder
Change the type.
Parameters:
type - the formal parameter type.
Returns:
this
See:
"FormalParameterBuilderFragment.java : appendTo : 652"
setParameterType(JvmTypeReference)
def setParameterType(JvmTypeReference) : IFormalParameterBuilder
Change the type.
Parameters:
type - the formal parameter type.
Returns:
this
See:
"FormalParameterBuilderFragment.java : appendTo : 706"
setReferenceInto(XFeatureCall)
def setReferenceInto(XFeatureCall) : IFormalParameterBuilder
Add a reference to this formal parameter in the given container.
Parameters:
container - the feature call that is supposed to contains the replied identifiable element.
Returns:
this
See:
"FormalParameterBuilderFragment.java : appendTo : 553"
setVarArg(boolean)
def setVarArg(boolean) : IFormalParameterBuilder
Change the variadic property of the parameter.
Parameters:
isVariadic - indicates if the parameter is variadic.
Returns:
this
See:
"FormalParameterBuilderFragment.java : appendTo : 749"