Package ghidra.app.util.datatype
Class DataTypeUrl
- java.lang.Object
-
- ghidra.app.util.datatype.DataTypeUrl
-
public class DataTypeUrl extends java.lang.ObjectA class to produce and parse URLs of the form:datatype:/12345678?uid=12345678&name=Bob
where the first number is the ID of theDataTypeManagerand the second number is theDataTypeID.
-
-
Constructor Summary
Constructors Constructor Description DataTypeUrl(DataType dt)Constructs a url from the given data typeDataTypeUrl(java.lang.String url)Constructs a url from the given url string
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)DataTypegetDataType(DataTypeManagerService service)Uses the given service and itsDataTypeManagers to find the data type represented by this urlUniversalIDgetDataTypeId()UniversalIDgetDataTypeManagerId()java.lang.StringgetDataTypeName()inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
DataTypeUrl
public DataTypeUrl(DataType dt)
Constructs a url from the given data type- Parameters:
dt- the data type; cannot be null
-
DataTypeUrl
public DataTypeUrl(java.lang.String url) throws java.lang.IllegalArgumentExceptionConstructs a url from the given url string- Parameters:
url- the url- Throws:
java.lang.IllegalArgumentException- if the url does not match the expectedURL_PATTERNor if there is an issue parsing the id within the given url
-
-
Method Detail
-
getDataTypeManagerId
public UniversalID getDataTypeManagerId()
-
getDataTypeId
public UniversalID getDataTypeId()
-
getDataTypeName
public java.lang.String getDataTypeName()
-
getDataType
public DataType getDataType(DataTypeManagerService service)
Uses the given service and itsDataTypeManagers 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
DataTypeManagerhas been closed
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-