io.sarl.lang.extralanguage.compiler
Class ExtraLanguageTypeConverter
final class ExtraLanguageTypeConverter
extends java.lang.Object
Converter from Jvm type to the extra language type.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
Since:
0.6
Nested Type Summary
Modifier and type Type and description
class ExtraLanguageTypeConverter.TypeConverterRuleReader
Reader of the conversion rules.
Constructor Summary
Action Summary
Modifier and type Action and description
java.lang.String convert(String)
Convert the given type to its equivalent in the extra language.
boolean hasConversion(String)
Indicates if the given name has a mapping to the extra language.
protected java.util.Map<K,V> initMapping
Build the mapping table.
boolean isImplicitJvmTypes
Replies if the JVM types (not in io.sarl.*) are implicitly supported by this converter.
boolean isImplicitSarlTypes
Replies if the SARL types (io.sarl.*) are implicitly supported by this converter.
void reset
Reset the mapping definition to its default content.
void setImplicitJvmTypes(boolean)
Set if the JVM types (not in io.sarl.*) are implicitly supported by this converter.
void setImplicitSarlTypes(boolean)
Set if the SARL types (io.sarl.*) are implicitly supported by this converter.
Constructor Details
new(IExtraLanguageConversionInitializer,IExtraLanguageGeneratorContext)
new(IExtraLanguageConversionInitializer,IExtraLanguageGeneratorContext)
Constructor.
Parameters:
initializer - the initializer.
context - the generation context.
Action Details
convert(String)
def convert(String) : java.lang.String
Convert the given type to its equivalent in the extra language.
Parameters:
type - the type to convert.
Returns:
the conversion result, or null if no equivalent exist.
hasConversion(String)
def hasConversion(String) : boolean
Indicates if the given name has a mapping to the extra language.
Parameters:
type - the type to convert.
Returns:
true if the mapping exists.
initMapping
protected def initMapping : java.util.Map<K,V>
Build the mapping table.
Returns:
the mapping table.
isImplicitJvmTypes
def isImplicitJvmTypes : boolean
Replies if the JVM types (not in io.sarl.*) are implicitly supported by this converter.
Returns:
true if the implicit types are converted. false if no implicit type is converted.
Since:
0.8
See:
isImplicitSarlTypes
isImplicitSarlTypes
def isImplicitSarlTypes : boolean
Replies if the SARL types (io.sarl.*) are implicitly supported by this converter.
Returns:
true if the implicit types are converted. false if no implicit type is converted.
Since:
0.8
See:
isImplicitSarlTypes
reset
def reset
Reset the mapping definition to its default content.
setImplicitJvmTypes(boolean)
def setImplicitJvmTypes(boolean)
Set if the JVM types (not in io.sarl.*) are implicitly supported by this converter.
Parameters:
enable - true if the implicit types are converted. false if no implicit type is converted.
Since:
0.8
See:
setImplicitSarlTypes(boolean)
setImplicitSarlTypes(boolean)
def setImplicitSarlTypes(boolean)
Set if the SARL types (io.sarl.*) are implicitly supported by this converter.
Parameters:
enable - true if the implicit types are converted. false if no implicit type is converted.
Since:
0.8
See:
setImplicitJvmTypes(boolean)