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 in Ghidra.- See Also:
FunctionTagAdapter
,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 database.FunctionTag
getFunctionTag(long id)
Returns the function tag with the given database id.FunctionTag
getFunctionTag(java.lang.String name)
Returns the function tag with the given name.boolean
isTagAssigned(java.lang.String name)
Returns true if the given tag is assigned to a function.void
setProgram(Program program)
Sets the program on this manager to allow the manager to persist changes and notify subscribers.
-
-
-
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
- Throws:
java.io.IOException
-
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
-
setProgram
void setProgram(Program program)
Sets the program on this manager to allow the manager to persist changes and notify subscribers.- Parameters:
program
- the program
-
-