Class SleighLanguageProvider

  • All Implemented Interfaces:
    LanguageProvider, ExtensionPoint

    public class SleighLanguageProvider
    extends java.lang.Object
    implements LanguageProvider
    Searches resources for spec files and provides LanguageDescriptions for these specifications
    • Field Detail

      • LANGUAGE_DIR_NAME

        public static final java.lang.String LANGUAGE_DIR_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • SleighLanguageProvider

        public SleighLanguageProvider()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • SleighLanguageProvider

        public SleighLanguageProvider​(ResourceFile ldefsFile)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • hadLoadFailure

        public boolean hadLoadFailure()
        Specified by:
        hadLoadFailure in interface LanguageProvider
        Returns:
        true if one of more languages or language description failed to load properly.
      • getLanguage

        public Language getLanguage​(LanguageID languageId)
        Description copied from interface: LanguageProvider
        Returns the language with the given name or null if no language has that name
        Specified by:
        getLanguage in interface LanguageProvider
        Parameters:
        languageId - the name of the language to be retrieved
        Returns:
        the Language with the given name
      • isLanguageLoaded

        public boolean isLanguageLoaded​(LanguageID languageId)
        Description copied from interface: LanguageProvider
        Returns true if the given language has been successfully loaded
        Specified by:
        isLanguageLoaded in interface LanguageProvider
        Parameters:
        languageId - the name of the language to be retrieved
        Returns:
        true if the given language has been successfully loaded