Package ghidra.app.script
Class GhidraScriptProperties
- java.lang.Object
 - 
- ghidra.app.script.GhidraScriptProperties
 
 
- 
public class GhidraScriptProperties extends java.lang.ObjectHandles processing for .properties files associated with a GhidraScript (.properties file and script should share the same basename).This should only be called/used by the GhidraScript class.
 
- 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclearProperties()booleancontainsKey(java.lang.String keyString)booleancontainsValue(java.lang.String valueString)java.lang.StringgetFilename()java.lang.StringgetValue(java.lang.String keyString)booleanisEmpty()java.util.Set<java.lang.String>keySet()protected voidloadGhidraScriptProperties(ResourceFile file)Load a .properties file.protected voidloadGhidraScriptProperties(ResourceFile scriptLocation, java.lang.String newBaseName)Load a .properties file given a directory (ResourceFile) and the basename (i.e., name of the GhidraScript without the extension).protected voidloadGhidraScriptProperties(java.util.List<ResourceFile> possibleLocations, java.lang.String newBaseName)Look for a .properties file corresponding to the basename in the given locations.protected java.lang.Stringput(java.lang.String key, java.lang.String value)protected java.lang.Stringremove(java.lang.String keyString)Remove the named propertyprotected java.util.Collection<java.lang.String>values() 
 - 
 
- 
- 
Method Detail
- 
loadGhidraScriptProperties
protected void loadGhidraScriptProperties(ResourceFile scriptLocation, java.lang.String newBaseName) throws java.io.IOException
Load a .properties file given a directory (ResourceFile) and the basename (i.e., name of the GhidraScript without the extension).- Parameters:
 scriptLocation- location of the GhidraScriptnewBaseName- name of the GhidraScript (without the extension)- Throws:
 java.io.IOException- if there is an exception loading the properties file
 
- 
getFilename
public java.lang.String getFilename()
- Returns:
 - the properties file name
 
 
- 
loadGhidraScriptProperties
protected void loadGhidraScriptProperties(java.util.List<ResourceFile> possibleLocations, java.lang.String newBaseName) throws java.io.IOException
Look for a .properties file corresponding to the basename in the given locations.- Parameters:
 possibleLocations- possible locations where the .properties file can be foundnewBaseName- name of the GhidraScript (without the extension)- Throws:
 java.io.IOException- if there is an exception loading the properties file
 
- 
loadGhidraScriptProperties
protected void loadGhidraScriptProperties(ResourceFile file) throws java.io.IOException
Load a .properties file.- Parameters:
 file- the .properties file- Throws:
 java.io.IOException- if there is an exception loading the properties file
 
- 
put
protected java.lang.String put(java.lang.String key, java.lang.String value) 
- 
getValue
public java.lang.String getValue(java.lang.String keyString)
- Parameters:
 keyString- the property name- Returns:
 - the value of the key in the properties file, or an empty string if no property exists
 
 
- 
isEmpty
public boolean isEmpty()
- Returns:
 - true if there are no properties
 
 
- 
remove
protected java.lang.String remove(java.lang.String keyString)
Remove the named property- Parameters:
 keyString- the property name- Returns:
 - the previous value or null
 
 
- 
clearProperties
protected void clearProperties()
 
- 
containsKey
public boolean containsKey(java.lang.String keyString)
- Parameters:
 keyString- a property name- Returns:
 - true if the key exists in the property file
 
 
- 
containsValue
public boolean containsValue(java.lang.String valueString)
- Parameters:
 valueString- a value string- Returns:
 - true if any property has the given value
 
 
- 
keySet
public java.util.Set<java.lang.String> keySet()
- Returns:
 - the property names for all properties
 
 
- 
values
protected java.util.Collection<java.lang.String> values()
 
 - 
 
 -