Class DefaultLanguageService

  • All Implemented Interfaces:
    LanguageService, java.util.EventListener, javax.swing.event.ChangeListener

    public class DefaultLanguageService
    extends java.lang.Object
    implements LanguageService, javax.swing.event.ChangeListener
    Default Language service used gather up all the languages that were found during the class search (search was for language providers)
    • Method Detail

      • getLanguageService

        public static LanguageService getLanguageService()
        Returns the single instance of the DefaultLanguageService.
        Returns:
        the language service
      • getLanguageService

        public static LanguageService getLanguageService​(ResourceFile sleighLdefsFile)
                                                  throws java.lang.Exception
        Return the single instance of the DefaultLanguageService. If not already instantiated in the default mode, the factory will be lazy and limit it set of languages to those defined by the specified Sleigh language definition file (*.ldefs) or those provided by subsequent calls to this method.
        Parameters:
        sleighLdefsFile - sleigh language definition file
        Returns:
        language factory instance
        Throws:
        java.lang.Exception - if an error occurs while parsing the specified definition file
      • getLanguageDescriptions

        public java.util.List<LanguageDescription> getLanguageDescriptions​(boolean includeDeprecatedLanguages)
        Description copied from interface: LanguageService
        Returns all known language Descriptions
        Specified by:
        getLanguageDescriptions in interface LanguageService
        Parameters:
        includeDeprecatedLanguages - TODO
        Returns:
        all know language Descriptions.
      • getLanguageDescriptions

        public java.util.List<LanguageDescription> getLanguageDescriptions​(Processor processor,
                                                                           Endian endianess,
                                                                           java.lang.Integer size,
                                                                           java.lang.String variant)
        Description copied from interface: LanguageService
        Returns all known language descriptions which satisfy the criteria identify by the non-null parameters. A null value implies a don't-care wildcard value.
        Specified by:
        getLanguageDescriptions in interface LanguageService
        Parameters:
        processor - the processor for which to get a language
        endianess - big or little
        size - processor address space size (in bits)
        variant - the processor version (usually 'default')
        Returns:
        the language descriptions that fit the parameters
      • getExternalLanguageDescriptions

        public java.util.List<LanguageDescription> getExternalLanguageDescriptions​(java.lang.String externalProcessorName,
                                                                                   java.lang.String externalTool,
                                                                                   Endian endianess,
                                                                                   java.lang.Integer size)
      • getDefinedExternalToolNames

        public static java.util.List<java.lang.String> getDefinedExternalToolNames​(java.lang.String languageId,
                                                                                   java.lang.String tool,
                                                                                   boolean includeDeprecated)
        Returns external names for specified language associated with other tools. For example, x86 languages are usually referred to as "metapc" by IDA-PRO.
        Parameters:
        languageId - language to search against
        tool - name of external tool to search against
        includeDeprecated - include deprecated LanguageDescriptions
        Returns:
        external names for this language associated with tool
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent e)
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener