Package ghidra.program.model.listing
Interface FunctionTagManager
-
- All Known Implementing Classes:
FunctionTagManagerDB
public interface FunctionTagManager
Interface for managing function tags. Tags are simple objects consisting of a name and an optional comment, which can be applied to functions. See ghidra.program.database.function.FunctionTagAdapter See ghidra.program.database.function.FunctionTagMappingAdapter
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FunctionTag
createFunctionTag(java.lang.String name, java.lang.String comment)
Creates a new function tag with the given attributes if one does not already exist.java.util.List<? extends FunctionTag>
getAllFunctionTags()
Returns all function tags in the databaseFunctionTag
getFunctionTag(long id)
Returns the function tag with the given database idFunctionTag
getFunctionTag(java.lang.String name)
Returns the function tag with the given nameint
getUseCount(FunctionTag tag)
Returns the number of times the given tag has been applied to a functionboolean
isTagAssigned(java.lang.String name)
Returns true if the given tag is assigned to a function
-
-
-
Method Detail
-
getFunctionTag
FunctionTag getFunctionTag(java.lang.String name)
Returns the function tag with the given name- Parameters:
name
- the tag name- Returns:
- the function tag, or null if not found
-
getFunctionTag
FunctionTag getFunctionTag(long id)
Returns the function tag with the given database id- Parameters:
id
- the tags database id- Returns:
- the function tag, or null if not found
-
getAllFunctionTags
java.util.List<? extends FunctionTag> getAllFunctionTags()
Returns all function tags in the database- Returns:
- list of function tags
-
isTagAssigned
boolean isTagAssigned(java.lang.String name)
Returns true if the given tag is assigned to a function- Parameters:
name
- the tag name- Returns:
- true if assigned to a function
-
createFunctionTag
FunctionTag createFunctionTag(java.lang.String name, java.lang.String comment)
Creates a new function tag with the given attributes if one does not already exist. Otherwise, returns the existing tag.- Parameters:
name
- the tag namecomment
- the comment associated with the tag (optional)- Returns:
- the new function tag
-
getUseCount
int getUseCount(FunctionTag tag)
Returns the number of times the given tag has been applied to a function- Parameters:
tag
- the tag- Returns:
- the count
-
-