Package ghidra.app.services
Interface DataService
public interface DataService
Service for creating data
-
Method Summary
Modifier and TypeMethodDescriptionbooleancreateData(DataType dt, ListingActionContext context, boolean stackPointers, boolean enableConflictHandling) Apply the given data type at a location.booleanisCreateDataAllowed(ListingActionContext context) Determine if create data is permitted on the specified location.
-
Method Details
-
isCreateDataAllowed
Determine if create data is permitted on the specified location. If the location is contained within the current program selection, the entire selection is examined.- Parameters:
context- the context containing program, location, and selection information- Returns:
- true if create data is allowed, else false.
-
createData
boolean createData(DataType dt, ListingActionContext context, boolean stackPointers, boolean enableConflictHandling) Apply the given data type at a location.- Parameters:
dt- data type to create at the locationcontext- the context containing program, location, and selection informationstackPointers- if true, and supported, and the existing context-specified data is a pointer, the specified datatype should be stacked onto the existing pointer if permitted. (seeDataUtilities.reconcileAppliedDataType(DataType, DataType, boolean)).enableConflictHandling- if true, the service may prompt the user to resolve data conflicts- Returns:
- true if the data could be created at the current location
-