io.sarl.lang.codebuilder.builders
Interface IScriptBuilder
All Known Implementing Classes:
ScriptSourceAppender, ScriptBuilderImpl
interface IScriptBuilder
Builder of Sarl scripts.

This builder is provided for helping to create Sarl Ecore elements.

Do not forget to invoke finalizeScript() for creating imports, etc.
Property Summary
Modifier and type Property and description
SarlScript script
Replies the Sarl script.
org.eclipse.xtext.common.types.access.IJvmTypeProvider typeResolutionContext
Replies the context for type resolution.
Action Summary
Modifier and type Action and description
abstract ISarlAgentBuilder addSarlAgent(String)
Create a SarlAgent builder.
abstract ISarlAnnotationTypeBuilder addSarlAnnotationType(String)
Create a SarlAnnotationType builder.
abstract ISarlArtifactBuilder addSarlArtifact(String)
Create a SarlArtifact builder.
abstract ISarlBehaviorBuilder addSarlBehavior(String)
Create a SarlBehavior builder.
abstract ISarlCapacityBuilder addSarlCapacity(String)
Create a SarlCapacity builder.
abstract ISarlClassBuilder addSarlClass(String)
Create a SarlClass builder.
abstract ISarlEnumerationBuilder addSarlEnumeration(String)
Create a SarlEnumeration builder.
abstract ISarlEventBuilder addSarlEvent(String)
Create a SarlEvent builder.
abstract ISarlInterfaceBuilder addSarlInterface(String)
Create a SarlInterface builder.
abstract ISarlSkillBuilder addSarlSkill(String)
Create a SarlSkill builder.
abstract ISarlSpaceBuilder addSarlSpace(String)
Create a SarlSpace builder.
abstract void eInit(Resource,String,IJvmTypeProvider)
Create the internal Sarl script.
abstract org.eclipse.emf.ecore.resource.Resource eResource
Replies the resource to which the script is attached.
abstract void finalizeScript
Finalize the script.
abstract SarlScript getScript
Replies the Sarl script.
abstract org.eclipse.xtext.common.types.access.IJvmTypeProvider getTypeResolutionContext
Replies the context for type resolution.
abstract boolean isFinalized
Replies if the script was finalized.
abstract org.eclipse.xtext.common.types.JvmParameterizedTypeReference newTypeRef(String)
Find the reference to the type with the given name.
abstract org.eclipse.xtext.common.types.JvmParameterizedTypeReference newTypeRef(Notifier,String)
Find the reference to the type with the given name.
Property Details
script
val script : SarlScript
Replies the Sarl script.

This property is an alias for the action: getScript

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.
Action Details
addSarlAgent(String)
def addSarlAgent(String) : ISarlAgentBuilder
Create a SarlAgent builder.
Parameters:
name - the name of the SarlAgent.
Returns:
the builder.
addSarlAnnotationType(String)
def addSarlAnnotationType(String) : ISarlAnnotationTypeBuilder
Create a SarlAnnotationType builder.
Parameters:
name - the name of the SarlAnnotationType.
Returns:
the builder.
addSarlArtifact(String)
def addSarlArtifact(String) : ISarlArtifactBuilder
Create a SarlArtifact builder.
Parameters:
name - the name of the SarlArtifact.
Returns:
the builder.
addSarlBehavior(String)
def addSarlBehavior(String) : ISarlBehaviorBuilder
Create a SarlBehavior builder.
Parameters:
name - the name of the SarlBehavior.
Returns:
the builder.
addSarlCapacity(String)
def addSarlCapacity(String) : ISarlCapacityBuilder
Create a SarlCapacity builder.
Parameters:
name - the name of the SarlCapacity.
Returns:
the builder.
addSarlClass(String)
def addSarlClass(String) : ISarlClassBuilder
Create a SarlClass builder.
Parameters:
name - the name of the SarlClass.
Returns:
the builder.
addSarlEnumeration(String)
def addSarlEnumeration(String) : ISarlEnumerationBuilder
Create a SarlEnumeration builder.
Parameters:
name - the name of the SarlEnumeration.
Returns:
the builder.
addSarlEvent(String)
def addSarlEvent(String) : ISarlEventBuilder
Create a SarlEvent builder.
Parameters:
name - the name of the SarlEvent.
Returns:
the builder.
addSarlInterface(String)
def addSarlInterface(String) : ISarlInterfaceBuilder
Create a SarlInterface builder.
Parameters:
name - the name of the SarlInterface.
Returns:
the builder.
addSarlSkill(String)
def addSarlSkill(String) : ISarlSkillBuilder
Create a SarlSkill builder.
Parameters:
name - the name of the SarlSkill.
Returns:
the builder.
addSarlSpace(String)
def addSarlSpace(String) : ISarlSpaceBuilder
Create a SarlSpace builder.
Parameters:
name - the name of the SarlSpace.
Returns:
the builder.
eInit(Resource,String,IJvmTypeProvider)
def eInit(Resource,String,IJvmTypeProvider)
Create the internal Sarl script.
eResource
def eResource : org.eclipse.emf.ecore.resource.Resource
Replies the resource to which the script is attached.
finalizeScript
def finalizeScript
Finalize the script.

The finalization includes:
  • The import section is created.
getScript
def getScript : SarlScript
Replies the Sarl script.
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.
isFinalized
def isFinalized : boolean
Replies if the script was finalized.
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.