Class SLanguageAdapter

    • Constructor Detail

      • SLanguageAdapter

        protected SLanguageAdapter​(@NotNull
                                   String language)
    • Method Detail

      • getSourceModule

        @Nullable
        public abstract Language getSourceModule()
        Description copied from interface: SLanguage
        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.
        Specified by:
        getSourceModule in interface SLanguage
      • getSourceModuleReference

        public abstract SModuleReference getSourceModuleReference()
        Description copied from interface: SLanguage
        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.
        Specified by:
        getSourceModuleReference in interface SLanguage
      • isValid

        public boolean isValid()
        Description copied from interface: SLanguage
        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
        Specified by:
        isValid in interface SLanguage
      • getLanguageRuntimes

        public Iterable<SModuleReference> getLanguageRuntimes()
        Description copied from interface: SLanguage
        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.
        Specified by:
        getLanguageRuntimes in interface SLanguage
      • getLanguageVersion

        public int getLanguageVersion()
        Description copied from interface: SLanguage
        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.
        Specified by:
        getLanguageVersion in interface SLanguage
        Returns:
        non-negative version of the language, or -1 the version could not be deduced.
      • serialize

        public abstract String serialize()