Class DataTypeDependencyOrderer

java.lang.Object
ghidra.app.util.DataTypeDependencyOrderer

public class DataTypeDependencyOrderer extends Object
  • Constructor Details

    • DataTypeDependencyOrderer

      public DataTypeDependencyOrderer(DataTypeManager dtManager)
      This constructor starts with an empty DataType list, which can be added to.
      Parameters:
      dtManager - the manager used to extract IDs
    • DataTypeDependencyOrderer

      public DataTypeDependencyOrderer(DataTypeManager dtManager, ArrayList<DataType> dtlist)
      This constructor takes an initial DataType list.
      Parameters:
      dtManager - the manager used to extract IDs
      dtlist - Initial list of DataTypes to order
  • Method Details

    • addType

      public void addType(DataType dataType)
      This method adds a single DataTypes to the input DataType list and marks the data as dirty (all must need recalculated).
      Parameters:
      dataType - A single DataType to add to the input DataType list.
    • addTypeList

      public void addTypeList(ArrayList<DataType> dtlist)
      This method adds a list of DataTypes to the input DataType list and marks the data as dirty (all must need recalculated).
      Parameters:
      dtlist - List of DataTypes to add to the input DataType list.
    • removeType

      public void removeType(DataType dataType)
      This method removes a DataType from the list and marks the data as dirty (all must need recalculated).
      Parameters:
      dataType - The DataType to remove from the input list
    • clear

      public void clear()
      This method clears the input DataType list and marks the data as dirty (all must need recalculated).
    • getAcyclicDependencyLists

      public Pair<ArrayList<DataType>,ArrayList<DataType>> getAcyclicDependencyLists()
      This method returns two lists: 1) is the set of structs/unions. Intended for outputting zero-sized definitions. 2) is the acyclic dependency list (broken at composites and pointers to composites) This works (and the dependency graph is able to be broken of cycles) because composites can be given zero size to start with and then later updated with full size.
      Returns:
      pair of arrayLists--one of composites and one complete list of dependents
    • getCompositeList

      public ArrayList<DataType> getCompositeList()
      This method returns the ArrayList of structs/unions
      Returns:
      An arrayList of Composite
    • getDependencyList

      public ArrayList<DataType> getDependencyList()
      This returns the acyclic dependency list (broken at composites and pointers to composites)
      Returns:
      An ArrayList of dependents.