Class ModelImports


  • public final class ModelImports
    extends Object
    Auxiliary facility to deal with model imports without knowledge about SModelInternal and its constantly updating API.

    This class doesn't address model access.

    Since:
    3.4
    • Constructor Detail

      • ModelImports

        public ModelImports​(SModel model)
    • Method Detail

      • getImportedModels

        public Collection<SModelReference> getImportedModels()
        Returns:
        nothing but snapshot of models explicitly listed as imports of the initial model, in no particular order. XXX and likely without null values.
      • removeUsedLanguage

        public void removeUsedLanguage​(@NotNull
                                       SLanguage language)
      • getUsedDevKits

        public Collection<SModuleReference> getUsedDevKits()
        Returns:
        snapshot of devkits listed as used by the model, in no particular order
      • getLanguagesEngagedOnGeneration

        public Collection<SLanguage> getLanguagesEngagedOnGeneration()
      • copyImportedModelsFrom

        public void copyImportedModelsFrom​(@NotNull
                                           SModel other)
        Use another model as source for necessary imports. Copies immediate imports of other models.
        Parameters:
        other - model to copy imports from
      • copyUsedLanguagesFrom

        public void copyUsedLanguagesFrom​(@NotNull
                                          SModel other)
        Use another model as source for necessary used languages. Note, only directly imported languages (not devkits nor closure of visible)
        Parameters:
        other - model to copy used languages from
      • copyEmployedDevKitsFrom

        public void copyEmployedDevKitsFrom​(@NotNull
                                            SModel other)
        Use another model as source for necessary devkits.
        Parameters:
        other - model to copy devkit imports from
      • copyLanguageEngagedOnGeneration

        public void copyLanguageEngagedOnGeneration​(@NotNull
                                                    SModel other)
        Use another model as specification of languages that are engaged during generation.
        Parameters:
        other - model to copy engaged languages from
      • clearImportedModels

        public void clearImportedModels()
      • clearEmployedDevKits

        public void clearEmployedDevKits()
      • clearUsedLanguages

        public void clearUsedLanguages()