Package ghidra.program.util

# Class ProgramDiffDetails

java.lang.Object
ghidra.program.util.ProgramDiffDetails

public class ProgramDiffDetails extends Object
ProgramDiffDetails is used to determine the detailed differences between two programs at a particular address. The differences are determined for the extent of the code units from each program at a particular address.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected String`
  `indent1`
  `protected String`
  `indent2`
  `protected String`
  `indent3`
  `protected String`
  `indent4`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ProgramDiffDetails(Program p1, Program p2)`
  Constructor for ProgramDiffDetails.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `getAllDetails(Address p1DiffAddress, StyledDocument doc, String prefixString)`
  Determine the detailed differences between the two programs at the indicated address.
  `void`
  `getDetails(Address p1DiffAddress, ProgramDiffFilter filter, StyledDocument doc, String prefixString)`
  Determine the detailed differences between the two programs at the indicated address.
  `AddressSetView`
  `getDetailsAddressSet(Address p1Address)`
  Gets the address set where detailed differences will be determined for details at the indicated address.
  `String`
  `getDiffDetails(Address p1DiffAddress)`
  Gets a string indicating the types of differences for the code units at the indicated address.
  `String`
  `getDiffDetails(Address p1DiffAddress, ProgramDiffFilter filter)`
  Gets a string indicating the types of differences for the code units at the indicated address.
  `static String`
  `getDiffDetails(Program p1, Program p2, Address p1DiffAddress)`
  Gets a string indicating the types of differences for the code units at the indicated address.
  `static String`
  `getDiffDetails(Program p1, Program p2, Address p1DiffAddress, ProgramDiffFilter filter)`
  Gets a string indicating the types of differences for the code units at the indicated address.

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

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

- ## Field Details

  - ### indent1

    protected String indent1

  - ### indent2

    protected String indent2

  - ### indent3

    protected String indent3

  - ### indent4

    protected String indent4

- ## Constructor Details

  - ### ProgramDiffDetails

    public ProgramDiffDetails(Program p1, Program p2)
    Constructor for ProgramDiffDetails.
    Parameters:
      `p1` - the original program
      `p2` - the program to diff against.

- ## Method Details

  - ### getDiffDetails

    public static String getDiffDetails(Program p1, Program p2, Address p1DiffAddress)
    Gets a string indicating the types of differences for the code units at the indicated address. The string contains information from each program where there are differences. It containing multiple lines separated by newline characters)
    Parameters:
      `p1` - the original program
      `p2` - the program to diff against.
      `p1DiffAddress` - the address that difference details are needed for. This address should be derived from program1.
    Returns:
      a string indicating the differences.

  - ### getDiffDetails

    public static String getDiffDetails(Program p1, Program p2, Address p1DiffAddress, ProgramDiffFilter filter)
    Gets a string indicating the types of differences for the code units at the indicated address. The string contains information from each program where there are differences. It containing multiple lines separated by newline characters)
    Parameters:
      `p1` - the original program
      `p2` - the program to diff against.
      `p1DiffAddress` - the address that difference details are needed for. This address should be derived from program1.
      `filter` - the program diff filter that indicates the diff details to show.
    Returns:
      a string indicating the differences.

  - ### getDiffDetails

    public String getDiffDetails(Address p1DiffAddress)
    Gets a string indicating the types of differences for the code units at the indicated address. The string contains information from each program where there are differences. It containing multiple lines separated by newline characters)
    Parameters:
      `p1DiffAddress` - the address that difference details are needed for. This address should be derived from program1.
    Returns:
      a string indicating the differences.

  - ### getDiffDetails

    public String getDiffDetails(Address p1DiffAddress, ProgramDiffFilter filter)
    Gets a string indicating the types of differences for the code units at the indicated address. The string contains information from each program where there are differences. It containing multiple lines separated by newline characters)
    Parameters:
      `p1DiffAddress` - the address that difference details are needed for. This address should be derived from program1.
      `filter` - the program diff filter that indicates the diff details to show.
    Returns:
      a string indicating the differences.

  - ### getAllDetails

    public void getAllDetails(Address p1DiffAddress, StyledDocument doc, String prefixString)
    Determine the detailed differences between the two programs at the indicated address. The differences are determined for the extent of the code units in the two programs at the indicated address.
    Parameters:
      `p1DiffAddress` - the address that difference details are needed for. This address should be derived from program1.
      `doc` - the document where the details of differences between the two programs should be written.
      `prefixString` - Line of text to display at beginning of the difference details information.

  - ### getDetails

    public void getDetails(Address p1DiffAddress, ProgramDiffFilter filter, StyledDocument doc, String prefixString)
    Determine the detailed differences between the two programs at the indicated address. The differences are determined for the extent of the code units in the two programs at the indicated address.
    Parameters:
      `p1DiffAddress` - the address that difference details are needed for. This address should be derived from program1.
      `filter` - the program diff filter that indicates the diff details to show.
      `doc` - the document where the details of differences between the two programs should be written.
      `prefixString` - Line of text to display at beginning of the difference details information.

  - ### getDetailsAddressSet

    public AddressSetView getDetailsAddressSet(Address p1Address)
    Gets the address set where detailed differences will be determined for details at the indicated address. An address set is returned since the indicated address may be in different sized code units in each of the two programs.
    Parameters:
      `p1Address` - the current address where details are desired. This address may be from program1 or program2.
    Returns:
      the program1 address set for code units containing that address within the programs being diffed.