Package ghidra.app.cmd.module

# Class AbstractModularizationCmd

java.lang.Object
ghidra.framework.cmd.BackgroundCommand<Program>
ghidra.app.cmd.module.AbstractModularizationCmd

All Implemented Interfaces:
  `Command<Program>`

Direct Known Subclasses:
  `ComplexityDepthModularizationCmd`, `DominanceModularizationCmd`

public abstract class AbstractModularizationCmd extends BackgroundCommand<Program>

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ProgramModule`
  `destinationModule`
  `protected TaskMonitor`
  `monitor`
  `protected Program`
  `program`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractModularizationCmd(String name, GroupPath path, String treeName, ProgramSelection selection, CodeBlockModel blockModel)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected abstract void`
  `applyModel()`
  `boolean`
  `applyTo(Program p, TaskMonitor taskMonitor)`
  Method called when this command is to apply changes to the given domain object.
  `protected void`
  `cleanEmpty()`
  `protected GDirectedGraph<CodeBlockVertex,CodeBlockEdge>`
  `createCallGraph()`
  `protected ProgramFragment`
  `createFragment(ProgramModule root, CodeBlock block)`
  `protected ProgramModule`
  `createModule(ProgramModule parent, String moduleName)`
  `protected void`
  `makeFragment(Program p, ProgramModule module, CodeBlockVertex vertex)`

  ### Methods inherited from class ghidra.framework.cmd.BackgroundCommand

  `applyTo, canCancel, dispose, getName, getStatusMsg, hasProgress, isModal, run, setStatusMsg, taskCompleted, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### program

    protected Program program

  - ### destinationModule

    protected ProgramModule destinationModule

  - ### monitor

    protected TaskMonitor monitor

- ## Constructor Details

  - ### AbstractModularizationCmd

    public AbstractModularizationCmd(String name, GroupPath path, String treeName, ProgramSelection selection, CodeBlockModel blockModel)

- ## Method Details

  - ### applyModel

    protected abstract void applyModel() throws CancelledException
    Throws:
      `CancelledException`

  - ### applyTo

    public boolean applyTo(Program p, TaskMonitor taskMonitor)
    Description copied from class: `BackgroundCommand`
    Method called when this command is to apply changes to the given domain object. A monitor is provided to display status information about the command as it executes in the background.
    Specified by:
      `applyTo` in class `BackgroundCommand<Program>`
    Parameters:
      `p` - domain object that will be affected by the command
      `taskMonitor` - monitor to show progress of the command
    Returns:
      true if the command applied successfully

  - ### cleanEmpty

    protected void cleanEmpty() throws NotEmptyException
    Throws:
      `NotEmptyException`

  - ### createCallGraph

    protected GDirectedGraph<CodeBlockVertex,CodeBlockEdge> createCallGraph() throws CancelledException
    Throws:
      `CancelledException`

  - ### makeFragment

    protected void makeFragment(Program p, ProgramModule module, CodeBlockVertex vertex)

  - ### createFragment

    protected ProgramFragment createFragment(ProgramModule root, CodeBlock block)

  - ### createModule

    protected ProgramModule createModule(ProgramModule parent, String moduleName)