Package ghidra.util
Class SaveableColor
- java.lang.Object
- 
- ghidra.util.PrivateSaveable
- 
- ghidra.util.SaveableColor
 
 
- 
- All Implemented Interfaces:
- Saveable
 
 public class SaveableColor extends PrivateSaveable 
- 
- 
Constructor SummaryConstructors Constructor Description SaveableColor()SaveableColor(java.awt.Color color)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.awt.ColorgetColor()java.lang.Class<?>[]getObjectStorageFields()Returns the field classes, in Java types, in the same order as usedSaveable.save(ghidra.util.ObjectStorage)andSaveable.restore(ghidra.util.ObjectStorage).intgetSchemaVersion()Get the storage schema version.inthashCode()booleanisUpgradeable(int oldSchemaVersion)Determine if the implementation supports an storage upgrade of the specified oldSchemaVersion to the current schema version.voidrestore(ObjectStorage objStorage)Restore from the given ObjectStorage.voidsave(ObjectStorage objStorage)Save to the given ObjectStorage.java.lang.StringtoString()booleanupgrade(ObjectStorage oldObjStorage, int oldSchemaVersion, ObjectStorage currentObjStorage)Upgrade an older stored object to the current storage schema.- 
Methods inherited from class ghidra.util.PrivateSaveableisPrivate
 
- 
 
- 
- 
- 
Method Detail- 
savepublic void save(ObjectStorage objStorage) Description copied from interface:SaveableSave to the given ObjectStorage.- Parameters:
- objStorage- Object that can handle Java primitives, Strings, and arrays of primitives and Strings
- See Also:
- Saveable.restore(ObjectStorage)
 
 - 
getObjectStorageFieldspublic java.lang.Class<?>[] getObjectStorageFields() Description copied from interface:SaveableReturns 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 then objStorage.putFloat(), then this method must return Class[]{ Integer.class, Float.class }. - Returns:
 
 - 
restorepublic void restore(ObjectStorage objStorage) Description copied from interface:SaveableRestore from the given ObjectStorage.- Parameters:
- objStorage- Object that can handle Java primitives, Strings, and arrays of primitives and Strings
- See Also:
- Saveable.save(ObjectStorage)
 
 - 
getColorpublic java.awt.Color getColor() 
 - 
getSchemaVersionpublic int getSchemaVersion() Description copied from interface:SaveableGet 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.- Returns:
- storage schema version.
- See Also:
- Saveable.getSchemaVersion()
 
 - 
isUpgradeablepublic boolean isUpgradeable(int oldSchemaVersion) Description copied from interface:SaveableDetermine if the implementation supports an storage upgrade of the specified oldSchemaVersion to the current schema version.- Returns:
- true if upgrading is supported for the older schema version.
- See Also:
- Saveable.isUpgradeable(int)
 
 - 
upgradepublic boolean upgrade(ObjectStorage oldObjStorage, int oldSchemaVersion, ObjectStorage currentObjStorage) Description copied from interface:SaveableUpgrade an older stored object to the current storage schema.- 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.
- See Also:
- Saveable.upgrade(ghidra.util.ObjectStorage, int, ghidra.util.ObjectStorage)
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-