Package ghidra.program.database.bookmark
Class OldBookmark
java.lang.Object
ghidra.program.database.bookmark.OldBookmark
- All Implemented Interfaces:
Saveable
-
Constructor Summary
ConstructorDescriptionConstructs a Note Bookmark (required for Saveable property objects).OldBookmark
(String type, String category, String comment, Address addr) Constructs a Bookmark. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return true if this object is the same as obj.Get the address of this bookmark info.Class<?>[]
Returns the field classes, in Java types, in the same order as usedSaveable.save(ghidra.util.ObjectStorage)
andSaveable.restore(ghidra.util.ObjectStorage)
.int
Get the storage schema version.getType()
boolean
Returns true if this saveable should not have it's changes broadcast.boolean
isUpgradeable
(int oldSchemaVersion) Determine if the implementation supports an storage upgrade of the specified oldSchemaVersion to the current schema version.void
restore
(ObjectStorage objStorage) Restore from the given ObjectStorage.void
save
(ObjectStorage objStorage) Save to the given ObjectStorage.void
setCategory
(String category) void
setComment
(String comment) toString()
boolean
upgrade
(ObjectStorage oldObjStorage, int oldSchemaVersion, ObjectStorage currentObjStorage) Upgrade an older stored object to the current storage schema.
-
Constructor Details
-
OldBookmark
Constructs a Bookmark.- Parameters:
type
-category
-comment
-addr
-
-
OldBookmark
public OldBookmark()Constructs a Note Bookmark (required for Saveable property objects). Contains no address.
-
-
Method Details
-
getType
-
getCategory
-
setCategory
-
getComment
-
setComment
-
getAddress
Get the address of this bookmark info.- Returns:
- Address
-
equals
Return true if this object is the same as obj. -
restore
Description copied from interface:Saveable
Restore from the given ObjectStorage. -
save
Description copied from interface:Saveable
Save to the given ObjectStorage. -
getObjectStorageFields
Description copied from interface:Saveable
Returns the field classes, in Java types, in the same order as usedSaveable.save(ghidra.util.ObjectStorage)
andSaveable.restore(ghidra.util.ObjectStorage)
.For example, if the save method calls
objStorage.putInt()
and thenobjStorage.putFloat()
, then this method must returnClass[]{ Integer.class, Float.class }
.- Specified by:
getObjectStorageFields
in interfaceSaveable
- Returns:
-
getSchemaVersion
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 interfaceSaveable
- Returns:
- storage schema version.
-
isUpgradeable
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 interfaceSaveable
- Parameters:
oldSchemaVersion
-- Returns:
- true if upgrading is supported for the older schema version.
-
upgrade
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 interfaceSaveable
- Parameters:
oldObjStorage
- the old stored objectoldSchemaVersion
- storage schema version number for the old objectcurrentObjStorage
- new object for storage in the current schema- Returns:
- true if data was upgraded to the currentObjStorage successfully.
-
isPrivate
public boolean isPrivate()Description copied from interface:Saveable
Returns true if this saveable should not have it's changes broadcast. -
toString
-