Package ghidra.program.model.data

# Interface ICategory

public interface ICategory

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final char`
  `DELIMITER_CHAR`
  `static final String`
  `DELIMITER_STRING`
  `static final String`
  `NAME_DELIMITER`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DataType`
  `addDataType(DataType dt, DataTypeConflictHandler handler)`
  `Category`
  `copyCategory(Category category, DataTypeConflictHandler handler, TaskMonitor monitor)`
  Make a new subcategory from the given category.
  `Category`
  `createCategory(String name)`
  Create a category with the given name.
  `Category[]`
  `getCategories()`
  Get all categories in this category.
  `Category`
  `getCategory(String name)`
  Get a category with the given name.
  `CategoryPath`
  `getCategoryPath()`
  `String`
  `getCategoryPathName()`
  Get the fully qualified name for this category.
  `DataType`
  `getDataType(String name)`
  Get a data type with the given name.
  `DataTypeManager`
  `getDataTypeManager()`
  Get the data type manager associated with this category.
  `DataType[]`
  `getDataTypes()`
  Get all data types in this category.
  `String`
  `getName()`
  Get the name of this category.
  `Category`
  `getParent()`
  Return this category's parent; return null if this is the root category.
  `Category`
  `getRoot()`
  Get the root category.
  `boolean`
  `isRoot()`
  `void`
  `moveCategory(Category category, TaskMonitor monitor)`
  Move the given category to this category; category is removed from its original parent category.
  `void`
  `moveDataType(DataType type, DataTypeConflictHandler handler)`
  `boolean`
  `remove(DataType type, TaskMonitor monitor)`
  `boolean`
  `removeCategory(String name, TaskMonitor monitor)`
  Remove the named category from this category.
  `void`
  `setName(String name)`

- ## Field Details

  - ### DELIMITER_CHAR

    static final char DELIMITER_CHAR
    See Also:
      - Constant Field Values

  - ### NAME_DELIMITER

    static final String NAME_DELIMITER
    See Also:
      - Constant Field Values

  - ### DELIMITER_STRING

    static final String DELIMITER_STRING
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getName

    String getName()
    Get the name of this category.

  - ### setName

    void setName(String name) throws DuplicateNameException, InvalidNameException
    Throws:
      `DuplicateNameException`
      `InvalidNameException`

  - ### getCategories

    Category[] getCategories()
    Get all categories in this category.
    Returns:
      zero-length array if there are no categories

  - ### getDataTypes

    DataType[] getDataTypes()
    Get all data types in this category.
    Returns:
      zero-length array if there are no data types

  - ### addDataType

    DataType addDataType(DataType dt, DataTypeConflictHandler handler)

  - ### getCategory

    Category getCategory(String name)
    Get a category with the given name.
    Parameters:
      `name` - the name of the category
    Returns:
      null if there is no category by this name

  - ### getCategoryPath

    CategoryPath getCategoryPath()

  - ### getDataType

    DataType getDataType(String name)
    Get a data type with the given name.
    Parameters:
      `name` - the name of the data type
    Returns:
      null if there is no data type by this name

  - ### createCategory

    Category createCategory(String name) throws DuplicateNameException, InvalidNameException
    Create a category with the given name.
    Parameters:
      `name` - the category name
    Throws:
      `DuplicateNameException` - if this category already contains a category or data type with the given name
      `InvalidNameException` - if name has invalid characters

  - ### removeCategory

    boolean removeCategory(String name, TaskMonitor monitor)
    Remove the named category from this category.
    Parameters:
      `name` - the name of the category to remove
      `monitor` - the task monitor
    Returns:
      true if the category was removed

  - ### moveCategory

    void moveCategory(Category category, TaskMonitor monitor) throws DuplicateNameException
    Move the given category to this category; category is removed from its original parent category.
    Parameters:
      `category` - the category to move
    Throws:
      `DuplicateNameException` - if this category already contains a category or data type with the same name as the category param.

  - ### copyCategory

    Category copyCategory(Category category, DataTypeConflictHandler handler, TaskMonitor monitor)
    Make a new subcategory from the given category.
    Parameters:
      `category` - the category to copy into this category
    Returns:
      category that is added to this category

  - ### getParent

    Category getParent()
    Return this category's parent; return null if this is the root category.

  - ### isRoot

    boolean isRoot()

  - ### getCategoryPathName

    String getCategoryPathName()
    Get the fully qualified name for this category.

  - ### getRoot

    Category getRoot()
    Get the root category.

  - ### getDataTypeManager

    DataTypeManager getDataTypeManager()
    Get the data type manager associated with this category.

  - ### moveDataType

    void moveDataType(DataType type, DataTypeConflictHandler handler) throws DataTypeDependencyException
    Parameters:
      `type` -
    Throws:
      `DataTypeDependencyException`

  - ### remove

    boolean remove(DataType type, TaskMonitor monitor)
    Parameters:
      `type` -