io.sarl.lang.codebuilder.appenders
Class ScriptSourceAppender
All Superinterfaces:
IScriptBuilder
class ScriptSourceAppender
extends AbstractSourceAppender
implements IScriptBuilder
Appender of Sarl scripts.
See:
"ScriptBuilderFragment.java : appendTo : 602"
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.
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
Replies the context for type resolution.
boolean isFinalized
Replies if the script was finalized.
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.
java.lang.String toString
Property Details
script
val script : SarlScript
Replies the Sarl script.

This property is an alias for the action: getScript

See:
"ScriptBuilderFragment.java : appendTo : 985"
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:
"ScriptBuilderFragment.java : appendTo : 871"
Constructor Details
new(IScriptBuilder)
new(IScriptBuilder)
See:
"ScriptBuilderFragment.java : appendTo : 885"
Action Details
addSarlAgent(String)
def addSarlAgent(String) : ISarlAgentBuilder
Create a SarlAgent builder.
Parameters:
name - the name of the SarlAgent.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
addSarlAnnotationType(String)
def addSarlAnnotationType(String) : ISarlAnnotationTypeBuilder
Create a SarlAnnotationType builder.
Parameters:
name - the name of the SarlAnnotationType.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
addSarlArtifact(String)
def addSarlArtifact(String) : ISarlArtifactBuilder
Create a SarlArtifact builder.
Parameters:
name - the name of the SarlArtifact.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
addSarlBehavior(String)
def addSarlBehavior(String) : ISarlBehaviorBuilder
Create a SarlBehavior builder.
Parameters:
name - the name of the SarlBehavior.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
addSarlCapacity(String)
def addSarlCapacity(String) : ISarlCapacityBuilder
Create a SarlCapacity builder.
Parameters:
name - the name of the SarlCapacity.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
addSarlClass(String)
def addSarlClass(String) : ISarlClassBuilder
Create a SarlClass builder.
Parameters:
name - the name of the SarlClass.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
addSarlEnumeration(String)
def addSarlEnumeration(String) : ISarlEnumerationBuilder
Create a SarlEnumeration builder.
Parameters:
name - the name of the SarlEnumeration.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
addSarlEvent(String)
def addSarlEvent(String) : ISarlEventBuilder
Create a SarlEvent builder.
Parameters:
name - the name of the SarlEvent.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
addSarlInterface(String)
def addSarlInterface(String) : ISarlInterfaceBuilder
Create a SarlInterface builder.
Parameters:
name - the name of the SarlInterface.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
addSarlSkill(String)
def addSarlSkill(String) : ISarlSkillBuilder
Create a SarlSkill builder.
Parameters:
name - the name of the SarlSkill.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
addSarlSpace(String)
def addSarlSpace(String) : ISarlSpaceBuilder
Create a SarlSpace builder.
Parameters:
name - the name of the SarlSpace.
Returns:
the builder.
See:
"ScriptBuilderFragment.java : appendTo : 490"
build(ISourceAppender)
def build(ISourceAppender)

throws java.io.IOException

See:
"ScriptBuilderFragment.java : appendTo : 897"
eInit(Resource,String,IJvmTypeProvider)
def eInit(Resource,String,IJvmTypeProvider)
Create the internal Sarl script.
Parameters:
resource - the Ecore resource in which the SARL script is located.
packageName - the fully-qualified name of the package of the script.
context - the context in which all the type resolutions must be done.
See:
"ScriptBuilderFragment.java : appendTo : 924"
eResource
def eResource : org.eclipse.emf.ecore.resource.Resource
Replies the resource to which the script is attached.
See:
"ScriptBuilderFragment.java : appendTo : 1014"
finalizeScript
def finalizeScript
Finalize the script.

The finalization includes:
  • The import section is created.
See:
"ScriptBuilderFragment.java : appendTo : 1047"
getScript
def getScript : SarlScript
Replies the Sarl script.
See:
"ScriptBuilderFragment.java : appendTo : 985"
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:
"ScriptBuilderFragment.java : appendTo : 871"
isFinalized
def isFinalized : boolean
Replies if the script was finalized.
See:
"ScriptBuilderFragment.java : appendTo : 1148"
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:
"ScriptBuilderFragment.java : appendTo : 702"
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:
"ScriptBuilderFragment.java : appendTo : 792"
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:
"ScriptBuilderFragment.java : appendTo : 730"
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:
"ScriptBuilderFragment.java : appendTo : 760"
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:
"ScriptBuilderFragment.java : appendTo : 826"
toString
def toString : java.lang.String
See:
"ScriptBuilderFragment.java : appendTo : 1172"