Package ghidra.program.database.function
Class FunctionTagDB
java.lang.Object
ghidra.program.database.DatabaseObject
ghidra.program.database.function.FunctionTagDB
- All Implemented Interfaces:
FunctionTag
,Comparable<FunctionTag>
Database object for
FunctionTagAdapter
objects.-
Field Summary
Fields inherited from class ghidra.program.database.DatabaseObject
key
-
Constructor Summary
ConstructorDescriptionFunctionTagDB
(FunctionTagManagerDB mgr, DBObjectCache<FunctionTagDB> cache, DBRecord record) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(FunctionTag otherTag) void
delete()
Deletes this tag from the programboolean
Returns the tag commentlong
getId()
Returns the id of the itemgetName()
Returns the tag nameint
hashCode()
protected boolean
refresh()
Tells the object to refresh its state from the database.protected boolean
Tells the object to refresh its state from the database using the specified record if not null.void
setComment
(String comment) Sets the comment for this tagvoid
Sets the name of the tagtoString()
Methods inherited from class ghidra.program.database.DatabaseObject
checkDeleted, checkIsValid, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, setDeleted, setInvalid, validate
-
Constructor Details
-
FunctionTagDB
-
-
Method Details
-
getId
public long getId()Description copied from interface:FunctionTag
Returns the id of the item- Specified by:
getId
in interfaceFunctionTag
- Returns:
- the id of the item
-
setComment
Description copied from interface:FunctionTag
Sets the comment for this tag- Specified by:
setComment
in interfaceFunctionTag
- Parameters:
comment
- the tag comment
-
setName
Description copied from interface:FunctionTag
Sets the name of the tag- Specified by:
setName
in interfaceFunctionTag
- Parameters:
name
- the tag name
-
getComment
Description copied from interface:FunctionTag
Returns the tag comment- Specified by:
getComment
in interfaceFunctionTag
- Returns:
- the tag comment
-
getName
Description copied from interface:FunctionTag
Returns the tag name- Specified by:
getName
in interfaceFunctionTag
- Returns:
- the tag name
-
refresh
protected boolean refresh()Description copied from class:DatabaseObject
Tells the object to refresh its state from the database.- Specified by:
refresh
in classDatabaseObject
- Returns:
- true if the object was able to refresh itself. Return false if the object was deleted. Objects that extend this class must implement a refresh method. If an object can never refresh itself, then it should always return false.
-
refresh
Description copied from class:DatabaseObject
Tells the object to refresh its state from the database using the specified record if not null. NOTE: The default implementation ignores the record and invokes refresh(). Implementations of this method must take care if multiple database tables are used since the record supplied could correspond to another object. In some cases it may be best not to override this method or ignore the record provided.- Overrides:
refresh
in classDatabaseObject
- Parameters:
rec
- valid record associated with object's key (optional, may be null to force record lookup or other refresh technique)- Returns:
- true if the object was able to refresh itself. Return false if record is null and object was deleted. Objects that extend this class must implement a refresh method. If an object can never refresh itself, then it should always return false.
-
delete
public void delete()Description copied from interface:FunctionTag
Deletes this tag from the program- Specified by:
delete
in interfaceFunctionTag
-
compareTo
- Specified by:
compareTo
in interfaceComparable<FunctionTag>
-
hashCode
public int hashCode() -
equals
-
toString
-