Package ghidra.program.util
Class DefaultLanguageService
java.lang.Object
ghidra.program.util.DefaultLanguageService
- All Implemented Interfaces:
LanguageService
Default Language service used gather up all the languages that were found
during the class search (search was for language providers)
-
Method Summary
ChangeModifier and TypeMethodDescriptiongetDefaultLanguage(Processor processor) Returns the default Language to use for the given processor;getDefinedExternalToolNames(String languageId, String tool, boolean includeDeprecated) Returns external names for specified language associated with other tools.MODIFIEDgetExternalLanguageDescriptions(String externalProcessorName, String externalTool, Endian endianness, Integer size) getLanguage(LanguageID languageID) Returns the language with the given language IDReturns all known language/compiler spec pairs which satisfy the criteria identify by the non-null parameters.Returns all known language/compiler spec pairs which satisfy the criteria identify by the non-null parameters.getLanguageDescription(LanguageID languageID) Get language information for the given language ID.getLanguageDescriptions(boolean includeDeprecatedLanguages) Returns all known language DescriptionsgetLanguageDescriptions(Processor processor) Returns all language Descriptions associated with the given processor.MODIFIEDgetLanguageDescriptions(Processor processor, Endian endianness, Integer size, String variant) Returns all known language descriptions which satisfy the criteria identify by the non-null parameters.static LanguageServiceReturns the single instance of the DefaultLanguageService.
-
Method Details
-
getLanguageService
Returns the single instance of the DefaultLanguageService.- Returns:
- the language service
-
getLanguage
Description copied from interface:LanguageServiceReturns the language with the given language ID- Specified by:
getLanguagein interfaceLanguageService- Parameters:
languageID- the ID of language to retrieve- Returns:
- the
Languagematching the given ID - Throws:
LanguageNotFoundException- if no language can be found for the given ID
-
getLanguageDescription
public LanguageDescription getLanguageDescription(LanguageID languageID) throws LanguageNotFoundException Description copied from interface:LanguageServiceGet language information for the given language ID.- Specified by:
getLanguageDescriptionin interfaceLanguageService- Parameters:
languageID- the id for the language.- Returns:
- language information for the given language ID.
- Throws:
LanguageNotFoundException- if there is no language for the given ID.
-
getLanguageDescriptions
Description copied from interface:LanguageServiceReturns all known language Descriptions- Specified by:
getLanguageDescriptionsin interfaceLanguageService- Parameters:
includeDeprecatedLanguages- TODO- Returns:
- all know language Descriptions.
-
getLanguageDescriptions MODIFIED
public List<LanguageDescription> getLanguageDescriptions(Processor processor, Endian endianness, Integer size, String variant) param 2 renamed: endianess → endianness-java.util.List<ghidra.program.model.lang.LanguageDescription> getLanguageDescriptions(ghidra.program.model.lang.Processor processor, ghidra.program.model.lang.Endian endianess, java.lang.Integer size, java.lang.String variant)+java.util.List<ghidra.program.model.lang.LanguageDescription> getLanguageDescriptions(ghidra.program.model.lang.Processor processor, ghidra.program.model.lang.Endian endianness, java.lang.Integer size, java.lang.String variant)Description copied from interface:LanguageServiceReturns 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:
getLanguageDescriptionsin interfaceLanguageService- Parameters:
processor- the processor for which to get a languageendianness(was: endianess) - big or littlesize- processor address space size (in bits)variant- the processor version (usually 'default')- Returns:
- the language descriptions that fit the parameters
-
getExternalLanguageDescriptions MODIFIED
public List<LanguageDescription> getExternalLanguageDescriptions(String externalProcessorName, String externalTool, Endian endianness, Integer size) param 3 renamed: endianess → endianness-java.util.List<ghidra.program.model.lang.LanguageDescription> getExternalLanguageDescriptions(java.lang.String externalProcessorName, java.lang.String externalTool, ghidra.program.model.lang.Endian endianess, java.lang.Integer size)+java.util.List<ghidra.program.model.lang.LanguageDescription> getExternalLanguageDescriptions(java.lang.String externalProcessorName, java.lang.String externalTool, ghidra.program.model.lang.Endian endianness, java.lang.Integer size) -
getLanguageCompilerSpecPairs
Description copied from interface:LanguageServiceReturns all known language/compiler spec pairs which satisfy the criteria identify by the non-null parameters. A null value implies a don't-care wildcard value. OMITS DEPRECATED LANGUAGES.- Specified by:
getLanguageCompilerSpecPairsin interfaceLanguageService- Parameters:
query- TODO- Returns:
-
getLanguageCompilerSpecPairs
public List<LanguageCompilerSpecPair> getLanguageCompilerSpecPairs(ExternalLanguageCompilerSpecQuery query) Description copied from interface:LanguageServiceReturns all known language/compiler spec pairs which satisfy the criteria identify by the non-null parameters. A null value implies a don't-care wildcard value. OMITS DEPRECATED LANGUAGES. This uses an ExternalLanguageCompilerSpecQuery rather than a LanguageCompilerSpecQuery.- Specified by:
getLanguageCompilerSpecPairsin interfaceLanguageService- Returns:
-
getLanguageDescriptions
Description copied from interface:LanguageServiceReturns all language Descriptions associated with the given processor.- Specified by:
getLanguageDescriptionsin interfaceLanguageService- Parameters:
processor- the processor for which to retrieve all know language descriptions.
-
getDefinedExternalToolNames
public static List<String> getDefinedExternalToolNames(String languageId, 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 againsttool- name of external tool to search againstincludeDeprecated- include deprecated LanguageDescriptions- Returns:
- external names for this language associated with tool
-
getDefaultLanguage
Description copied from interface:LanguageServiceReturns the default Language to use for the given processor;- Specified by:
getDefaultLanguagein interfaceLanguageService- Parameters:
processor- the processor for which to get a language.- Throws:
LanguageNotFoundException- if there is no languages at all for the given processor.
-