Class GhidraScriptProperties


  • public class GhidraScriptProperties
    extends java.lang.Object
    Handles 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 void clearProperties()  
      boolean containsKey​(java.lang.String keyString)  
      boolean containsValue​(java.lang.String valueString)  
      java.lang.String getFilename()  
      java.lang.String getValue​(java.lang.String keyString)  
      boolean isEmpty()  
      java.util.Set<java.lang.String> keySet()  
      protected void loadGhidraScriptProperties​(ResourceFile file)
      Load a .properties file.
      protected void loadGhidraScriptProperties​(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 void loadGhidraScriptProperties​(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.String put​(java.lang.String key, java.lang.String value)  
      protected java.lang.String remove​(java.lang.String keyString)  
      protected java.util.Collection<java.lang.String> values()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GhidraScriptProperties

        public GhidraScriptProperties()
    • 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 GhidraScript
        newBaseName - 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()
      • 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 found
        newBaseName - 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)
      • isEmpty

        public boolean isEmpty()
      • remove

        protected java.lang.String remove​(java.lang.String keyString)
      • clearProperties

        protected void clearProperties()
      • containsKey

        public boolean containsKey​(java.lang.String keyString)
      • containsValue

        public boolean containsValue​(java.lang.String valueString)
      • keySet

        public java.util.Set<java.lang.String> keySet()
      • values

        protected java.util.Collection<java.lang.String> values()