Package ghidra.program.util

# Class CommentChangeRecord

java.lang.Object
ghidra.framework.model.DomainObjectChangeRecord
ghidra.program.util.ProgramChangeRecord
ghidra.program.util.CommentChangeRecord

All Implemented Interfaces:
  `Serializable`

public class CommentChangeRecord extends ProgramChangeRecord
Change record for comment changes

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CommentChangeRecord(CommentType commentType, Address address, String oldValue, String newValue)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CommentType`
  `getCommentType()`
  Returns the comment type as defined in `CodeUnit`.
  `String`
  `getNewComment()`
  Returns the new comment or null if this is a result of deleting the comment.
  `String`
  `getOldComment()`
  Returns the previous comment or null if there was no previous comment.

  ### Methods inherited from class ghidra.program.util.ProgramChangeRecord

  `getEnd, getObject, getStart, toString`

  ### Methods inherited from class ghidra.framework.model.DomainObjectChangeRecord

  `getEventType, getNewValue, getOldValue`

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

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

- ## Constructor Details

  - ### CommentChangeRecord

    public CommentChangeRecord(CommentType commentType, Address address, String oldValue, String newValue)
    Constructor
    Parameters:
      `commentType` - `comment type`
      `address` - the address of the comment change
      `oldValue` - the old comment (may be null for a new comment)
      `newValue` - the new comment (may be null if the comment was deleted)

- ## Method Details

  - ### getCommentType

    public CommentType getCommentType()
    Returns the comment type as defined in `CodeUnit`.
    Returns:
      the comment type

  - ### getOldComment

    public String getOldComment()
    Returns the previous comment or null if there was no previous comment.
    Returns:
      the previous comment or null if there was no previous comment.

  - ### getNewComment

    public String getNewComment()
    Returns the new comment or null if this is a result of deleting the comment.
    Returns:
      the new comment or null if this is a result of deleting the comment