Class OldLanguageMappingService


  • public class OldLanguageMappingService
    extends java.lang.Object
    • Constructor Detail

      • OldLanguageMappingService

        public OldLanguageMappingService()
    • Method Detail

      • lookupMagicString

        public static LanguageCompilerSpecPair lookupMagicString​(java.lang.String magicString,
                                                                 boolean languageReplacementOK)
        Check for a mapping of an old language-name magicString to a LanguageID/CompilerSpec pair. If returnLanguageReplacement is false, the returned LanguageID/CompilerSpec pair may no longer exist and may require use of an OldLanguage and translation process.
        Parameters:
        magicString - old language name magic string
        languageReplacementOK - if true the LanguageID/CompilerSpec pair corresponding to the latest language implementation will be returned if found, otherwise the a deprecated LanguageID/CompilerSpec pair may be returned. This parameter should be false if there is a sensitivity to the language implementation (e.g., instruction prototypes, etc.)
        Returns:
        LanguageID/CompilerSpec pair or null if entry not found.
      • doLookupMagicString

        protected LanguageCompilerSpecPair doLookupMagicString​(java.lang.String magicString,
                                                               boolean languageReplacementOK)
      • processXmlLanguageString

        public static LanguageCompilerSpecPair processXmlLanguageString​(java.lang.String languageString)
        Parse the language string from an XML language name into the most appropriate LanguageID/CompilerSpec pair. The language name may either be an old name (i.e., magicString) or a new : string. If an old language name magic-string is provided, its replacement language will be returned if known. The returned pair may or may not be available based upon available language implementations.
        Parameters:
        languageString - old or new language string
        Returns:
        LanguageID/CompilerSpec pair or null if no old name mapping could be found.