Package ghidra.program.model.data
Class DataTypePath
java.lang.Object
ghidra.program.model.data.DataTypePath
- All Implemented Interfaces:
Comparable<DataTypePath>
Object to hold a category path and a datatype name. They are held separately so that
the datatype name can contain a categoryPath delimiter ("/") character.
-
Constructor Summary
ConstructorDescriptionDataTypePath
(CategoryPath categoryPath, String dataTypeName) Create DatatypePathDataTypePath
(String categoryPath, String dataTypeName) Create DatatypePath -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(DataTypePath other) boolean
Returns the categoryPath for the datatype represented by this datatype path.Returns the name of the datatype.getPath()
Returns the full path of this datatype.int
hashCode()
boolean
isAncestor
(CategoryPath otherCategoryPath) Determine if the specified otherCategoryPath is an ancestor of this data type path (i.e., does this data types category or any of its parent hierarchy correspond to the specified categoryPath).toString()
-
Constructor Details
-
DataTypePath
Create DatatypePath- Parameters:
categoryPath
- the category path for the datatypedataTypeName
- the name of the datatype.- Throws:
IllegalArgumentException
- if an invalid category path or dataTypeName is given.
-
DataTypePath
Create DatatypePath- Parameters:
categoryPath
- the category path for the datatypedataTypeName
- the name of the datatype.- Throws:
IllegalArgumentException
- if a null category path or dataTypeName is given.
-
-
Method Details
-
getCategoryPath
Returns the categoryPath for the datatype represented by this datatype path. (ie. the CategoryPath that contains the DataType that this DataTypePath points to).- Returns:
- the parent
CategoryPath
of theDataType
that this DataTypePath points to.
-
isAncestor
Determine if the specified otherCategoryPath is an ancestor of this data type path (i.e., does this data types category or any of its parent hierarchy correspond to the specified categoryPath).- Parameters:
otherCategoryPath
- category path- Returns:
- true if otherCategoryPath is an ancestor of this data type path, else false
-
getDataTypeName
Returns the name of the datatype.- Returns:
- the name
-
getPath
Returns the full path of this datatype. NOTE: if the datatype name contains any "/" characters, then the resulting path string may be ambiguous as to where the category path ends and the datatype name begins.- Returns:
- the full path
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<DataTypePath>
-
toString
-