Package ghidra.program.model.data
Interface ICategory
-
public interface ICategory
-
-
Field Summary
Fields Modifier and Type Field Description static char
DELIMITER_CHAR
static java.lang.String
DELIMITER_STRING
static java.lang.String
NAME_DELIMITER
-
Method Summary
All Methods Instance Methods Abstract Methods 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(java.lang.String name)
Create a category with the given name.Category[]
getCategories()
Get all categories in this category.Category
getCategory(java.lang.String name)
Get a category with the given name.CategoryPath
getCategoryPath()
java.lang.String
getCategoryPathName()
Get the fully qualified name for this category.DataType
getDataType(java.lang.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.java.lang.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(java.lang.String name, TaskMonitor monitor)
Remove the named category from this category.void
setName(java.lang.String name)
-
-
-
Field Detail
-
DELIMITER_CHAR
static final char DELIMITER_CHAR
- See Also:
- Constant Field Values
-
NAME_DELIMITER
static final java.lang.String NAME_DELIMITER
- See Also:
- Constant Field Values
-
DELIMITER_STRING
static final java.lang.String DELIMITER_STRING
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
java.lang.String getName()
Get the name of this category.
-
setName
void setName(java.lang.String name) 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(java.lang.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(java.lang.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(java.lang.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 nameInvalidNameException
- if name has invalid characters
-
removeCategory
boolean removeCategory(java.lang.String name, TaskMonitor monitor)
Remove the named category from this category.- Parameters:
name
- the name of the category to removemonitor
- 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
java.lang.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
-
-
-