Interface SLanguage
-
public interface SLanguage
Reference to a deployed/run-time language. If the specified language is missing in the current MPS instance, onlyqualified name
is guaranteed to return meaningful value. Besides,getLanguageVersion()
might be sensible as well, depending on source SLanguage instance comes from (e.g. if it's an used/imported language of a model, then version value indicates actual value at the time import was added/updated).At the moment, equality of instances this class doesn't respect version. This might get changed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Iterable<SAbstractConcept>
getConcepts()
All concepts defined in the language, empty if the language is invalid (missing).Iterable<SDataType>
getDatatypes()
All datatypes defined in the language, empty if the language is invalid (missing).Iterable<SModuleReference>
getLanguageRuntimes()
All the runtime dependencies that a language needs after generation to run the generated code.int
getLanguageVersion()
Deprecated.String
getQualifiedName()
The namespace of the language.SModule
getSourceModule()
The optional reference to a module containing the sources for the language.SModuleReference
getSourceModuleReference()
The optional reference to a module containing the sources for the language.boolean
isValid()
Returns true if this language is fully-functional.
-
-
-
Method Detail
-
getConcepts
Iterable<SAbstractConcept> getConcepts()
All concepts defined in the language, empty if the language is invalid (missing).
-
getDatatypes
@NotNull Iterable<SDataType> getDatatypes()
All datatypes defined in the language, empty if the language is invalid (missing).
-
isValid
boolean isValid()
Returns true if this language is fully-functional. Typically, user code should not care about this Can return false, for example, if the language is absent
-
getLanguageRuntimes
Iterable<SModuleReference> getLanguageRuntimes()
All the runtime dependencies that a language needs after generation to run the generated code. These will be resolved from the user repository. Empty sequence in case language is invalid/missing.
-
getSourceModule
@Nullable SModule getSourceModule()
The optional reference to a module containing the sources for the language. This is useful, for example, when showing the definition of a concept for a used language element. It may be null.
-
getSourceModuleReference
SModuleReference getSourceModuleReference()
The optional reference to a module containing the sources for the language. This is useful, for example, when showing the definition of a concept for a used language element.
-
getLanguageVersion
@Deprecated int getLanguageVersion()
Deprecated.Version of the referenced language. Version is an integer indicating state of a language. It is changed when the structure of this language changes. Typically this means that if some module uses an older version of a language, it should be updated before the user will be able to work with it. E.g. generator can fail on generation of such a model. In MPS 3.2, version is changed only by adding language migrations.- Returns:
- non-negative version of the language, or -1 the version could not be deduced.
-
-