Class SLanguageAdapter
- java.lang.Object
 - 
- jetbrains.mps.smodel.adapter.structure.language.SLanguageAdapter
 
 
- 
- All Implemented Interfaces:
 SLanguage
- Direct Known Subclasses:
 InvalidLanguage,SLanguageAdapterById
public abstract class SLanguageAdapter extends Object implements SLanguage
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringID_DELIMprotected StringmyLanguageFqName 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedSLanguageAdapter(String language) 
- 
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SLanguageAdapterdeserialize(String s)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).abstract LanguageRuntimegetLanguageDescriptor()Iterable<SModuleReference>getLanguageRuntimes()All the runtime dependencies that a language needs after generation to run the generated code.intgetLanguageVersion()Version of the referenced language.abstract LanguagegetSourceModule()The optional reference to a module containing the sources for the language.abstract SModuleReferencegetSourceModuleReference()The optional reference to a module containing the sources for the language.booleanisValid()Returns true if this language is fully-functional.abstract Stringserialize()StringtoString()- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface org.jetbrains.mps.openapi.language.SLanguage
getQualifiedName 
 - 
 
 - 
 
- 
- 
Field Detail
- 
ID_DELIM
public static final String ID_DELIM
- See Also:
 - Constant Field Values
 
 
- 
myLanguageFqName
protected final String myLanguageFqName
 
 - 
 
- 
Method Detail
- 
getLanguageDescriptor
@Nullable public abstract LanguageRuntime getLanguageDescriptor()
 
- 
getSourceModule
@Nullable public abstract Language getSourceModule()
Description copied from interface:SLanguageThe 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.- Specified by:
 getSourceModulein interfaceSLanguage
 
- 
getSourceModuleReference
public abstract SModuleReference getSourceModuleReference()
Description copied from interface:SLanguageThe 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.- Specified by:
 getSourceModuleReferencein interfaceSLanguage
 
- 
isValid
public boolean isValid()
Description copied from interface:SLanguageReturns 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 
- 
getConcepts
public Iterable<SAbstractConcept> getConcepts()
Description copied from interface:SLanguageAll concepts defined in the language, empty if the language is invalid (missing).- Specified by:
 getConceptsin interfaceSLanguage
 
- 
getDatatypes
@NotNull public Iterable<SDataType> getDatatypes()
Description copied from interface:SLanguageAll datatypes defined in the language, empty if the language is invalid (missing).- Specified by:
 getDatatypesin interfaceSLanguage
 
- 
getLanguageRuntimes
public Iterable<SModuleReference> getLanguageRuntimes()
Description copied from interface:SLanguageAll 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.- Specified by:
 getLanguageRuntimesin interfaceSLanguage
 
- 
getLanguageVersion
public int getLanguageVersion()
Description copied from interface:SLanguageVersion 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.- Specified by:
 getLanguageVersionin interfaceSLanguage- Returns:
 - non-negative version of the language, or -1 the version could not be deduced.
 
 
- 
serialize
public abstract String serialize()
 
- 
deserialize
public static SLanguageAdapter deserialize(String s)
 
 - 
 
 -