Package ghidra.app.util.datatype
Class DataTypeUrl
java.lang.Object
ghidra.app.util.datatype.DataTypeUrl
A class to produce and parse URLs of the form:
datatype:/12345678?uid=12345678&name=Bobwhere the first number is the ID of the
DataTypeManager
and the second number is
the DataType
ID.-
Constructor Summary
ConstructorDescriptionDataTypeUrl
(DataType dt) Constructs a url from the given data typeDataTypeUrl
(String url) Constructs a url from the given url string -
Method Summary
Modifier and TypeMethodDescriptionboolean
getDataType
(DataTypeManagerService service) Uses the given service and itsDataTypeManager
s to find the data type represented by this urlint
hashCode()
toString()
-
Constructor Details
-
DataTypeUrl
Constructs a url from the given data type- Parameters:
dt
- the data type; cannot be null
-
DataTypeUrl
Constructs a url from the given url string- Parameters:
url
- the url- Throws:
IllegalArgumentException
- if the url does not match the expectedURL_PATTERN
or if there is an issue parsing the id within the given url
-
-
Method Details
-
getDataTypeManagerId
-
getDataTypeId
-
getDataTypeName
-
getDataType
Uses the given service and itsDataTypeManager
s to find the data type represented by this url- Parameters:
service
- the service- Returns:
- the data type; null if there was an error restoring the type, such as if the
parent
DataTypeManager
has been closed
-
hashCode
public int hashCode() -
equals
-
toString
-