io.sarl.lang.codebuilder.appenders
Class ExpressionSourceAppender
All Superinterfaces:
IExpressionBuilder
class ExpressionSourceAppender
extends AbstractSourceAppender
implements IExpressionBuilder
Builder of a Sarl XExpression.
See:
"ExpressionBuilderFragment.java : appendTo : 188"
Property Summary
Modifier and type Property and description
org.eclipse.xtext.common.types.access.IJvmTypeProvider typeResolutionContext
Replies the context for type resolution.
org.eclipse.xtext.xbase.XExpression xExpression
Replies the last created expression.
Field Summary
Constructor Summary
Constructor and description
new(IExpressionBuilder)
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.
org.eclipse.xtext.xbase.XFeatureCall createReferenceToSuper
Create a reference to "super" object or to the super type.
org.eclipse.xtext.xbase.XFeatureCall createReferenceToThis
Create a reference to "this" object or to the current type.
void dispose
Dispose the resource.
void eInit(EObject,Procedure1<Param>,IJvmTypeProvider)
Initialize the expression.
org.eclipse.emf.ecore.resource.Resource eResource
Replies the resource to which the XExpression is attached.
java.lang.String getDefaultValueForType(String)
Replies the default value for the given type.
java.lang.String getDefaultValueForType(JvmTypeReference)
Replies the default value for the given type.
org.eclipse.xtext.xbase.XExpression getDefaultXExpressionForType(String)
Replies the XExpression for the default value associated to the given type.
org.eclipse.xtext.xbase.XExpression getDefaultXExpressionForType(JvmTypeReference)
Replies the XExpression for the default value associated to the given type.
org.eclipse.xtext.common.types.access.IJvmTypeProvider getTypeResolutionContext
Replies the context for type resolution.
org.eclipse.xtext.xbase.XExpression getXExpression
Replies the last created expression.
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.
IExpressionBuilder setDocumentation(String)
Change the documentation of the element.
IExpressionBuilder setExpression(String)
Change the expression in the container.
IExpressionBuilder setXExpression(XExpression)
Change the expression in the container.
java.lang.String toString
Property Details
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:
"ExpressionBuilderFragment.java : appendTo : 431"
xExpression
val xExpression : org.eclipse.xtext.xbase.XExpression
Replies the last created expression.

This property is an alias for the action: getXExpression

Returns:
the last created expression.
See:
"ExpressionBuilderFragment.java : appendTo : 495"
Constructor Details
new(IExpressionBuilder)
new(IExpressionBuilder)
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"
createReferenceToSuper
def createReferenceToSuper : org.eclipse.xtext.xbase.XFeatureCall
Create a reference to "super" object or to the super type.
Returns:
the reference.
See:
"ExpressionBuilderFragment.java : appendTo : 1074"
createReferenceToThis
def createReferenceToThis : org.eclipse.xtext.xbase.XFeatureCall
Create a reference to "this" object or to the current type.
Returns:
the reference.
See:
"ExpressionBuilderFragment.java : appendTo : 1016"
dispose
def dispose
Dispose the resource.
See:
"ExpressionBuilderFragment.java : appendTo : 1173"
eInit(EObject,Procedure1<Param>,IJvmTypeProvider)
def eInit(EObject,Procedure1<Param>,IJvmTypeProvider)
Initialize the expression.
Parameters:
context - the context of the expressions.
setter - the object that permits to assign the expression to the context.
typeContext - the context for type resolution.
See:
"ExpressionBuilderFragment.java : appendTo : 452"
eResource
def eResource : org.eclipse.emf.ecore.resource.Resource
Replies the resource to which the XExpression is attached.
See:
"ExpressionBuilderFragment.java : appendTo : 524"
getDefaultValueForType(String)
def getDefaultValueForType(String) : java.lang.String
Replies the default value for the given type.
Parameters:
type - the type for which the default value should be determined.
Returns:
the default value.
See:
"ExpressionBuilderFragment.java : appendTo : 925"
getDefaultValueForType(JvmTypeReference)
def getDefaultValueForType(JvmTypeReference) : java.lang.String
Replies the default value for the given type.
Parameters:
type - the type for which the default value should be determined.
Returns:
the default value.
See:
"ExpressionBuilderFragment.java : appendTo : 957"
getDefaultXExpressionForType(String)
def getDefaultXExpressionForType(String) : org.eclipse.xtext.xbase.XExpression
Replies the XExpression for the default value associated to the given type.
Parameters:
type - the type for which the default value should be determined.
Returns:
the default value.
See:
"ExpressionBuilderFragment.java : appendTo : 857"
getDefaultXExpressionForType(JvmTypeReference)
def getDefaultXExpressionForType(JvmTypeReference) : org.eclipse.xtext.xbase.XExpression
Replies the XExpression for the default value associated to the given type.
Parameters:
type - the type for which the default value should be determined.
Returns:
the default value.
See:
"ExpressionBuilderFragment.java : appendTo : 890"
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:
"ExpressionBuilderFragment.java : appendTo : 431"
getXExpression
def getXExpression : org.eclipse.xtext.xbase.XExpression
Replies the last created expression.
Returns:
the last created expression.
See:
"ExpressionBuilderFragment.java : appendTo : 495"
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:
"ExpressionBuilderFragment.java : appendTo : 262"
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:
"ExpressionBuilderFragment.java : appendTo : 352"
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:
"ExpressionBuilderFragment.java : appendTo : 290"
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:
"ExpressionBuilderFragment.java : appendTo : 320"
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:
"ExpressionBuilderFragment.java : appendTo : 386"
setDocumentation(String)
def setDocumentation(String) : IExpressionBuilder
Change the documentation of the element.

The documentation will be displayed just before the element.
Parameters:
doc - the documentation.
Returns:
this .
See:
"AbstractSubCodeBuilderFragment.java : appendTo : 603"
setExpression(String)
def setExpression(String) : IExpressionBuilder
Change the expression in the container.
Parameters:
expression - the textual representation of the expression.
Returns:
this
See:
"ExpressionBuilderFragment.java : appendTo : 567"
setXExpression(XExpression)
def setXExpression(XExpression) : IExpressionBuilder
Change the expression in the container.
Parameters:
expression - the expression.
Returns:
this
See:
"ExpressionBuilderFragment.java : appendTo : 603"
toString
def toString : java.lang.String