Package ghidra.app.services
Interface DataTypeQueryService
- All Known Subinterfaces:
DataTypeManagerService
public interface DataTypeQueryService
Simplified datatype service interface to provide query capabilities to a set of open datatype
managers.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfindDataTypes(String name, TaskMonitor monitor) Finds all data types matching the given name.getDataType(String filterText) Deprecated, for removal: This API element is subject to removal in a future version.Get the data type for the given data type path.Get the data type for the given data type path from the program's data type manager.Prompts the user for a data type.Gets the sorted list of all datatypes known by this service via it's owned DataTypeManagers.promptForDataType(String filterText) Obtain the preferred datatype which corresponds to the specified datatype specified by filterText.
-
Method Details
-
getSortedDataTypeList
Gets the sorted list of all datatypes known by this service via it's owned DataTypeManagers. This method can be called frequently, as the underlying data is indexed and only updated as changes are made. The sorting of the list is done using theDataTypeComparatorwhose primary sort is based upon theDataTypeNameComparator.- Returns:
- the sorted list of known data types.
-
getSortedCategoryPathList
List<CategoryPath> getSortedCategoryPathList()Prompts the user for a data type. The optional filter text will be used to filter the tree of available types. Gets the sorted list of all category paths known by this service via its owned DataTypeManagers. This method can be called frequently, as the underlying data is indexed and only updated as changes are made. The sorting of the list is done using the natural sort of theCategoryPathobjects.- Returns:
- the sorted list of known category paths.
-
getDataType
Deprecated, for removal: This API element is subject to removal in a future version.This method simply callspromptForDataType(String) -
promptForDataType
Obtain the preferred datatype which corresponds to the specified datatype specified by filterText. A tool-based service provider may prompt the user to select a datatype if more than one possibility exists.- Parameters:
filterText- If not null, this text filters the visible data types to only show those that start with the given text- Returns:
- the preferred data type (e.g., chosen by the user) or null if no match found or selection was cancelled by user.
-
findDataTypes
Finds all data types matching the given name. This method will search all open data type archives.Unlike
findDataTypes(String, TaskMonitor), this method will not return.conflictdata types. If you need those types, then you must call each data type manager directly.In the list of types returned, the program data type manager's types will be in the list before types from other archives.
- Parameters:
name- the data type name to findmonitor- the task monitor- Returns:
- the data types
- See Also:
-
getDataTypesByPath
Get the data type for the given data type path.This method will check each open data type manager for a data type that matches the path.
If a type is in the program data type manager, then it will be first in the returned list.
- Parameters:
path- the path- Returns:
- the data type
-
getProgramDataTypeByPath
Get the data type for the given data type path from the program's data type manager.- Parameters:
path- the path- Returns:
- the data type; null if the type does not exist
-
promptForDataType(String)