Class OldBookmark

java.lang.Object
ghidra.program.database.bookmark.OldBookmark
All Implemented Interfaces:
Saveable

public class OldBookmark extends Object implements Saveable
  • Constructor Details Link icon

    • OldBookmark Link icon

      public OldBookmark(String type, String category, String comment, Address addr)
      Constructs a Bookmark.
      Parameters:
      type -
      category -
      comment -
      addr -
    • OldBookmark Link icon

      public OldBookmark()
      Constructs a Note Bookmark (required for Saveable property objects). Contains no address.
  • Method Details Link icon

    • getType Link icon

      public String getType()
    • getCategory Link icon

      public String getCategory()
    • setCategory Link icon

      public void setCategory(String category)
    • getComment Link icon

      public String getComment()
    • setComment Link icon

      public void setComment(String comment)
    • getAddress Link icon

      public Address getAddress()
      Get the address of this bookmark info.
      Returns:
      Address
    • equals Link icon

      public boolean equals(Object obj)
      Return true if this object is the same as obj.
      Overrides:
      equals in class Object
    • restore Link icon

      public void restore(ObjectStorage objStorage)
      Description copied from interface: Saveable
      Restore from the given ObjectStorage.
      Specified by:
      restore in interface Saveable
      Parameters:
      objStorage - Object that can handle Java primitives, Strings, and arrays of primitives and Strings TODO: document how errors should be handled (i.e, exception, null return)
      See Also:
    • save Link icon

      public void save(ObjectStorage objStorage)
      Description copied from interface: Saveable
      Save to the given ObjectStorage.
      Specified by:
      save in interface Saveable
      Parameters:
      objStorage - Object that can handle Java primitives, Strings, and arrays of primitives and Strings
      See Also:
    • getObjectStorageFields Link icon

      public Class<?>[] getObjectStorageFields()
      Description copied from interface: Saveable
      Returns the field classes, in Java types, in the same order as used Saveable.save(ghidra.util.ObjectStorage) and Saveable.restore(ghidra.util.ObjectStorage).

      For example, if the save method calls objStorage.putInt() and then objStorage.putFloat(), then this method must return Class[]{ Integer.class, Float.class }.

      Specified by:
      getObjectStorageFields in interface Saveable
      Returns:
    • getSchemaVersion Link icon

      public int getSchemaVersion()
      Description copied from interface: Saveable
      Get the storage schema version. Any time there is a software release in which the implementing class has changed the data structure used for the save and restore methods, the schema version must be incremented. NOTE: While this could be a static method, the Saveable interface is unable to define such methods.
      Specified by:
      getSchemaVersion in interface Saveable
      Returns:
      storage schema version.
    • isUpgradeable Link icon

      public boolean isUpgradeable(int oldSchemaVersion)
      Description copied from interface: Saveable
      Determine if the implementation supports an storage upgrade of the specified oldSchemaVersion to the current schema version.
      Specified by:
      isUpgradeable in interface Saveable
      Parameters:
      oldSchemaVersion -
      Returns:
      true if upgrading is supported for the older schema version.
    • upgrade Link icon

      public boolean upgrade(ObjectStorage oldObjStorage, int oldSchemaVersion, ObjectStorage currentObjStorage)
      Description copied from interface: Saveable
      Upgrade an older stored object to the current storage schema.
      Specified by:
      upgrade in interface Saveable
      Parameters:
      oldObjStorage - the old stored object
      oldSchemaVersion - storage schema version number for the old object
      currentObjStorage - new object for storage in the current schema
      Returns:
      true if data was upgraded to the currentObjStorage successfully.
    • isPrivate Link icon

      public boolean isPrivate()
      Description copied from interface: Saveable
      Returns true if this saveable should not have it's changes broadcast.
      Specified by:
      isPrivate in interface Saveable
      Returns:
      true if this saveable should not have it's changes broadcast.
    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object