Class LanguageScopeFactory

    • Constructor Detail

      • LanguageScopeFactory

        public LanguageScopeFactory​(LanguageRegistry languageRegistry)
    • Method Detail

      • getIndexOf

        public int getIndexOf​(String namespace)
      • getLanguageScope

        public LanguageScope getLanguageScope​(Collection<SLanguage> langs1,
                                              Collection<SLanguage> langs2)
        Produces a new LanguageScope from the two corresponding to the parameters langs1 and langs2 by merging.
        Parameters:
        langs1 -
        langs2 -
        Returns:
      • getMultiLanguageScope

        public LanguageScope getMultiLanguageScope​(Iterable<? extends Collection<SLanguage>> multiLangs)
        Produces a new LanguageScope from the ones corresponding to the collections in parameter multiLangs.
        Parameters:
        multiLangs -
        Returns:
      • getLanguageScope

        public LanguageScope getLanguageScope​(Collection<SLanguage> langs)
        This method implements a memoization scheme for the "extended languages hierarchy" using the specified collection of languages. The objects constituting the contents of the langs collection are expected to never change, and thus can be treated as opaque. As a result, we can cache the calculated scope value with the key derived from objects representing the languages.
        Parameters:
        langs - the dependencies collection; all languages included in this scope
        Returns: