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 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 name
        comment - 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