io.sarl.lang.codebuilder.appenders
Class SarlClassSourceAppender
All Superinterfaces:
ISarlClassBuilder
class SarlClassSourceAppender
extends AbstractSourceAppender
implements ISarlClassBuilder
Source adapter of a Sarl SarlClass.
See:
"TopElementBuilderFragment.java : appendTo : 354"
Property Summary
Modifier and type Property and description
org.eclipse.xtext.common.types.JvmDeclaredType jvmDeclaredType
Replies the JVM declared type for this generated SarlClass.
SarlClass sarlClass
Replies the generated SarlClass.
org.eclipse.xtext.common.types.access.IJvmTypeProvider typeResolutionContext
Field Summary
Constructor Summary
Constructor and description
new(ISarlClassBuilder)
Action Summary
Modifier and type Action and description
ISarlActionBuilder addDefSarlAction(String)
Create a SarlAction.
ISarlClassBuilder addImplements(String)
Add an implemented type.
ISarlClassBuilder addImplements(JvmTypeReference)
Add an implemented type.
ISarlClassBuilder addModifier(String)
Add a modifier.
ISarlActionBuilder addOverrideSarlAction(String)
Create a SarlAction.
ISarlActionBuilder addSarlAction(String)
Create a SarlAction
ISarlAnnotationTypeBuilder addSarlAnnotationType(String)
Create a SarlAnnotationType.
ISarlClassBuilder addSarlClass(String)
Create a SarlClass.
ISarlConstructorBuilder addSarlConstructor
Create a SarlConstructor.
ISarlEnumerationBuilder addSarlEnumeration(String)
Create a SarlEnumeration.
ISarlFieldBuilder addSarlField(String)
Create a SarlField
ISarlInterfaceBuilder addSarlInterface(String)
Create a SarlInterface.
ITypeParameterBuilder addTypeParameter(String)
Add a type parameter.
ISarlFieldBuilder addValSarlField(String)
Create a SarlField.
ISarlFieldBuilder addVarSarlField(String)
Create a SarlField.
void build(ISourceAppender)
Fill the given receiver with the serialization of the element that is associated to this appender.
void dispose
Dispose the resource.
void eInit(SarlScript,String,IJvmTypeProvider)
Initialize the Ecore element when inside a script.
void eInit(XtendTypeDeclaration,String,IJvmTypeProvider)
Initialize the Ecore element when inner type declaration.
org.eclipse.emf.ecore.resource.Resource eResource
Replies the resource to which the SarlClass is attached.
org.eclipse.xtext.common.types.JvmDeclaredType getJvmDeclaredType
Replies the JVM declared type for this generated SarlClass.
SarlClass getSarlClass
Replies the generated SarlClass.
org.eclipse.xtext.common.types.JvmTypeReference getSarlClassReference(JvmTypeReference*)
Replies the reference to the generated SarlAgent.
org.eclipse.xtext.common.types.access.IJvmTypeProvider getTypeResolutionContext
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.
ISarlClassBuilder setDocumentation(String)
Change the documentation of the element.
ISarlClassBuilder setExtends(String)
Change the super type.
ISarlClassBuilder setExtends(JvmTypeReference)
Change the super type.
java.lang.String toString
Property Details
jvmDeclaredType
val jvmDeclaredType : org.eclipse.xtext.common.types.JvmDeclaredType
Replies the JVM declared type for this generated SarlClass.

This property is an alias for the action: getJvmDeclaredType

Returns:
the type, never null .
Since:
0.15
See:
"TopElementBuilderFragment.java : appendTo : 1893"
sarlClass
val sarlClass : SarlClass
Replies the generated SarlClass.

This property is an alias for the action: getSarlClass

See:
"TopElementBuilderFragment.java : appendTo : 1798"
typeResolutionContext
val typeResolutionContext : org.eclipse.xtext.common.types.access.IJvmTypeProvider

This property is an alias for the action: getTypeResolutionContext

Constructor Details
new(ISarlClassBuilder)
new(ISarlClassBuilder)
Action Details
addDefSarlAction(String)
def addDefSarlAction(String) : ISarlActionBuilder
Create a SarlAction.
Parameters:
name - the name of the SarlAction.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 564"
addImplements(String)
def addImplements(String) : ISarlClassBuilder
Add an implemented type.
Parameters:
type - the qualified name of the implemented type.
Returns:
this
See:
"TopElementBuilderFragment.java : appendTo : 2197"
addImplements(JvmTypeReference)
def addImplements(JvmTypeReference) : ISarlClassBuilder
Add an implemented type.
Parameters:
type - the implemented type.
Returns:
this
See:
"TopElementBuilderFragment.java : appendTo : 2294"
addModifier(String)
def addModifier(String) : ISarlClassBuilder
Add a modifier.
Parameters:
modifier - the modifier to add.
Returns:
this .
See:
"TopElementBuilderFragment.java : appendTo : 2492"
addOverrideSarlAction(String)
def addOverrideSarlAction(String) : ISarlActionBuilder
Create a SarlAction.
Parameters:
name - the name of the SarlAction.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 564"
addSarlAction(String)
def addSarlAction(String) : ISarlActionBuilder
Create a SarlAction. *

This function is equivalent to #addDefSarlAction.
Parameters:
name - the name of the SarlAction.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 706"
addSarlAnnotationType(String)
def addSarlAnnotationType(String) : ISarlAnnotationTypeBuilder
Create a SarlAnnotationType.
Parameters:
name - the name of the SarlAnnotationType.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 564"
addSarlClass(String)
def addSarlClass(String) : ISarlClassBuilder
Create a SarlClass.
Parameters:
name - the name of the SarlClass.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 564"
addSarlConstructor
def addSarlConstructor : ISarlConstructorBuilder
Create a SarlConstructor.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 564"
addSarlEnumeration(String)
def addSarlEnumeration(String) : ISarlEnumerationBuilder
Create a SarlEnumeration.
Parameters:
name - the name of the SarlEnumeration.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 564"
addSarlField(String)
def addSarlField(String) : ISarlFieldBuilder
Create a SarlField. *

This function is equivalent to #addVarSarlField.
Parameters:
name - the name of the SarlField.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 706"
addSarlInterface(String)
def addSarlInterface(String) : ISarlInterfaceBuilder
Create a SarlInterface.
Parameters:
name - the name of the SarlInterface.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 564"
addTypeParameter(String)
def addTypeParameter(String) : ITypeParameterBuilder
Add a type parameter.
Parameters:
name - the simple name of the type parameter.
Returns:
the builder of type parameter.
See:
"TopElementBuilderFragment.java : appendTo : 2546"
addValSarlField(String)
def addValSarlField(String) : ISarlFieldBuilder
Create a SarlField.
Parameters:
name - the name of the SarlField.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 564"
addVarSarlField(String)
def addVarSarlField(String) : ISarlFieldBuilder
Create a SarlField.
Parameters:
name - the name of the SarlField.
Returns:
the builder.
See:
"TopElementBuilderFragment.java : appendTo : 564"
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"
dispose
def dispose
Dispose the resource.
See:
"TopElementBuilderFragment.java : appendTo : 1613"
eInit(SarlScript,String,IJvmTypeProvider)
def eInit(SarlScript,String,IJvmTypeProvider)
Initialize the Ecore element when inside a script.
Parameters:
script - the SARL script in which this SarlClass is added.
name - the simple name of the SarlClass.
context - the context in which the resolution of types must be done.
See:
"TopElementBuilderFragment.java : appendTo : 1662"
eInit(XtendTypeDeclaration,String,IJvmTypeProvider)
def eInit(XtendTypeDeclaration,String,IJvmTypeProvider)
Initialize the Ecore element when inner type declaration.
Parameters:
container - the Ecore type that must contain this new SarlClass.
name - the simple name of the SarlClass.
context - the context in which the resolution of types must be done.
See:
"TopElementBuilderFragment.java : appendTo : 1741"
eResource
def eResource : org.eclipse.emf.ecore.resource.Resource
Replies the resource to which the SarlClass is attached.
See:
"TopElementBuilderFragment.java : appendTo : 1928"
getJvmDeclaredType
def getJvmDeclaredType : org.eclipse.xtext.common.types.JvmDeclaredType
Replies the JVM declared type for this generated SarlClass.
Returns:
the type, never null .
Since:
0.15
See:
"TopElementBuilderFragment.java : appendTo : 1893"
getSarlClass
def getSarlClass : SarlClass
Replies the generated SarlClass.
See:
"TopElementBuilderFragment.java : appendTo : 1798"
getSarlClassReference(JvmTypeReference*)
def getSarlClassReference(JvmTypeReference*) : org.eclipse.xtext.common.types.JvmTypeReference
Replies the reference to the generated SarlAgent.
Parameters:
args - the generic type arguments to put inside the reference.
Since:
0.15
See:
"TopElementBuilderFragment.java : appendTo : 1838"
getTypeResolutionContext
def getTypeResolutionContext : org.eclipse.xtext.common.types.access.IJvmTypeProvider
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:
"TopElementBuilderFragment.java : appendTo : 1426"
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:
"TopElementBuilderFragment.java : appendTo : 1516"
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:
"TopElementBuilderFragment.java : appendTo : 1454"
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:
"TopElementBuilderFragment.java : appendTo : 1484"
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:
"TopElementBuilderFragment.java : appendTo : 1550"
setDocumentation(String)
def setDocumentation(String) : ISarlClassBuilder
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"
setExtends(String)
def setExtends(String) : ISarlClassBuilder
Change the super type.
Parameters:
superType - the qualified name of the super type, or null if the default type.
Returns:
this
See:
"TopElementBuilderFragment.java : appendTo : 1984"
setExtends(JvmTypeReference)
def setExtends(JvmTypeReference) : ISarlClassBuilder
Change the super type.
Parameters:
superType - the super type, or null if the default type.
Returns:
this .
See:
"TopElementBuilderFragment.java : appendTo : 2085"
toString
def toString : java.lang.String
See:
"TopElementBuilderFragment.java : appendTo : 1625"