Package ghidra.program.database.function
Class FunctionTagDB
- java.lang.Object
-
- ghidra.program.database.DatabaseObject
-
- ghidra.program.database.function.FunctionTagDB
-
- All Implemented Interfaces:
FunctionTag,java.lang.Comparable<FunctionTag>
public class FunctionTagDB extends DatabaseObject implements FunctionTag
Database object forFunctionTagAdapterobjects.
-
-
Field Summary
-
Fields inherited from class ghidra.program.database.DatabaseObject
key
-
-
Constructor Summary
Constructors Constructor Description FunctionTagDB(FunctionTagManagerDB mgr, DBObjectCache<FunctionTagDB> cache, Record record)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(FunctionTag otherTag)voiddelete()Deletes this tag from the program.booleanequals(java.lang.Object obj)java.lang.StringgetComment()Returns the tag comment.longgetId()Returns the id of the item.java.lang.StringgetName()Returns the tag name.inthashCode()protected booleanrefresh()Tells the object to refresh its state from the database.protected booleanrefresh(Record rec)Tells the object to refresh its state from the database using the specified record if not null.voidsetComment(java.lang.String comment)Sets the comment for this tag.voidsetName(java.lang.String name)Sets the name of the tag.-
Methods inherited from class ghidra.program.database.DatabaseObject
checkDeleted, checkIsValid, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, setInvalid, validate
-
-
-
-
Constructor Detail
-
FunctionTagDB
public FunctionTagDB(FunctionTagManagerDB mgr, DBObjectCache<FunctionTagDB> cache, Record record)
-
-
Method Detail
-
getId
public long getId()
Description copied from interface:FunctionTagReturns the id of the item.- Specified by:
getIdin interfaceFunctionTag- Returns:
-
setComment
public void setComment(java.lang.String comment)
Description copied from interface:FunctionTagSets the comment for this tag.- Specified by:
setCommentin interfaceFunctionTag- Parameters:
comment- the tag comment
-
setName
public void setName(java.lang.String name)
Description copied from interface:FunctionTagSets the name of the tag.- Specified by:
setNamein interfaceFunctionTag- Parameters:
name- the tag name
-
getComment
public java.lang.String getComment()
Description copied from interface:FunctionTagReturns the tag comment.- Specified by:
getCommentin interfaceFunctionTag- Returns:
-
getName
public java.lang.String getName()
Description copied from interface:FunctionTagReturns the tag name.- Specified by:
getNamein interfaceFunctionTag- Returns:
-
refresh
protected boolean refresh()
Description copied from class:DatabaseObjectTells the object to refresh its state from the database.- Specified by:
refreshin 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
protected boolean refresh(Record rec)
Description copied from class:DatabaseObjectTells 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:
refreshin 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.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(FunctionTag otherTag)
- Specified by:
compareToin interfacejava.lang.Comparable<FunctionTag>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
delete
public void delete()
Description copied from interface:FunctionTagDeletes this tag from the program.- Specified by:
deletein interfaceFunctionTag
-
-