io.sarl.lang.codebuilder.appenders
Class ExpressionSourceAppender
All Superinterfaces:
IExpressionBuilder
class ExpressionSourceAppender
extends AbstractSourceAppender
implements IExpressionBuilder
Builder of a Sarl XExpression.
Property Summary
Modifier and type Property and description
org.eclipse.xtext.common.types.access.IJvmTypeProvider typeResolutionContext
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)
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.
org.eclipse.xtext.xbase.XExpression getDefaultXExpressionForType(String)
Replies the XExpression for the default value associated to the given type.
org.eclipse.xtext.common.types.access.IJvmTypeProvider getTypeResolutionContext
org.eclipse.xtext.xbase.XExpression getXExpression
Replies the last created expression.
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 setDocumentation(String)
Change the documentation of the element.
void setExpression(String)
Change the expression in the container.
void setXExpression(XExpression)
Change the expression in the container.
java.lang.String toString
Property Details
typeResolutionContext
val typeResolutionContext : org.eclipse.xtext.common.types.access.IJvmTypeProvider

This property is an alias for the action: getTypeResolutionContext

xExpression
var 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.
Constructor Details
new(IExpressionBuilder)
new(IExpressionBuilder)
Action Details
build(ISourceAppender)
def build(ISourceAppender)

throws java.io.IOException

createReferenceToSuper
def createReferenceToSuper : org.eclipse.xtext.xbase.XFeatureCall
Create a reference to "super" object or to the super type.
Returns:
the reference.
createReferenceToThis
def createReferenceToThis : org.eclipse.xtext.xbase.XFeatureCall
Create a reference to "this" object or to the current type.
Returns:
the reference.
dispose
def dispose
Dispose the resource.
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.
eResource
def eResource : org.eclipse.emf.ecore.resource.Resource
Replies the resource to which the XExpression is attached.
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.
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.
getTypeResolutionContext
def getTypeResolutionContext : org.eclipse.xtext.common.types.access.IJvmTypeProvider
getXExpression
def getXExpression : org.eclipse.xtext.xbase.XExpression
Replies the last created expression.
Returns:
the last created expression.
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.
setDocumentation(String)
def setDocumentation(String)
Change the documentation of the element.

The documentation will be displayed just before the element.
Parameters:
doc - the documentation.
setExpression(String)
def setExpression(String)
Change the expression in the container.
Parameters:
expression - the textual representation of the expression.
setXExpression(XExpression)
def setXExpression(XExpression)
Change the expression in the container.
Parameters:
expression - the expression.
toString
def toString : java.lang.String