Class SpecExtensionUtils
java.lang.Object
ghidra.app.util.sourcelanguage.SpecExtensionUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns aListofSpecExtensionXML file contents found in the given directory.readSpecExtensionJsonConfig(ResourceFile jsonFile, Program program, MessageLog log, TaskMonitor monitor) Returns aListofSourceLanguageSpecExtension.SpecExtensionRules based on the given JSON configuration file.static StringreadSpecExtensionXmlFile(ResourceFile xmlFile) Returns the givenSpecExtensionXML file's contents.
-
Constructor Details
-
SpecExtensionUtils
public SpecExtensionUtils()
-
-
Method Details
-
readSpecExtensionXmlFile
Returns the givenSpecExtensionXML file's contents.- Parameters:
xmlFile- ASpecExtensionXML file- Returns:
- the given
SpecExtensionXML file's contents - Throws:
IOException- if there was a problem reading the XML file
-
readSpecExtensionDir
Returns aListofSpecExtensionXML file contents found in the given directory.- Parameters:
dir- A directory containingSpecExtensionXML files- Returns:
- a
ListofSpecExtensionXML file contents found in the given directory - Throws:
IOException- if there was a problem reading the XML files
-
readSpecExtensionJsonConfig
public static List<SourceLanguageSpecExtension.SpecExtensionRule> readSpecExtensionJsonConfig(ResourceFile jsonFile, Program program, MessageLog log, TaskMonitor monitor) throws IOException Returns aListofSourceLanguageSpecExtension.SpecExtensionRules based on the given JSON configuration file.- Parameters:
jsonFile- The JSON configuration fileprogram- TheProgramlog- The error logmonitor- The monitor- Returns:
- a
ListofSourceLanguageSpecExtension.SpecExtensionRules based on the given JSON configuration file - Throws:
IOException- if there was a problem reading the JSON configuration file or theSpecExtensionXML files it references
-