io.sarl.lang.codebuilder.appenders
Class ScriptSourceAppender
All Superinterfaces:
IScriptBuilder
class ScriptSourceAppender
extends AbstractSourceAppender
implements IScriptBuilder
Appender of Sarl scripts.
Property Summary
Modifier and type Property and description
SarlScript script
Replies the Sarl script.
org.eclipse.xtext.common.types.access.IJvmTypeProvider typeResolutionContext
Field Summary
Constructor Summary
Constructor and description
new(IScriptBuilder)
Action Summary
Modifier and type Action and description
ISarlAgentBuilder addSarlAgent(String)
Create a SarlAgent builder.
ISarlAnnotationTypeBuilder addSarlAnnotationType(String)
Create a SarlAnnotationType builder.
ISarlArtifactBuilder addSarlArtifact(String)
Create a SarlArtifact builder.
ISarlBehaviorBuilder addSarlBehavior(String)
Create a SarlBehavior builder.
ISarlCapacityBuilder addSarlCapacity(String)
Create a SarlCapacity builder.
ISarlClassBuilder addSarlClass(String)
Create a SarlClass builder.
ISarlEnumerationBuilder addSarlEnumeration(String)
Create a SarlEnumeration builder.
ISarlEventBuilder addSarlEvent(String)
Create a SarlEvent builder.
ISarlInterfaceBuilder addSarlInterface(String)
Create a SarlInterface builder.
ISarlSkillBuilder addSarlSkill(String)
Create a SarlSkill builder.
ISarlSpaceBuilder addSarlSpace(String)
Create a SarlSpace builder.
void build(ISourceAppender)
void eInit(Resource,String,IJvmTypeProvider)
Create the internal Sarl script.
org.eclipse.emf.ecore.resource.Resource eResource
Replies the resource to which the script is attached.
void finalizeScript
Finalize the script.
SarlScript getScript
Replies the Sarl script.
org.eclipse.xtext.common.types.access.IJvmTypeProvider getTypeResolutionContext
boolean isFinalized
Replies if the script was finalized.
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.
java.lang.String toString
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

This property is an alias for the action: getTypeResolutionContext

Constructor Details
new(IScriptBuilder)
new(IScriptBuilder)
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.
build(ISourceAppender)
def build(ISourceAppender)

throws java.io.IOException

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
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.
toString
def toString : java.lang.String