Interface Blame


public interface Blame
Provides blame (or praise) data for a span of lines within a file.
  • Method Summary

    Modifier and Type
    Method
    Description
    The author who last updated the lines in the span.
    The timestamp at which the author committed the revision.
    A shorted version of the commit hash for the revision, suitable for display.
    The full commit hash for the revision.
    default Person
    The committer who last updated the lines in the span.
    default Date
    The timestamp at which the committer created the revision.
    The name the file had when the lines in the span were updated, which may not match the file's current name.
    int
    The 1-based line number in the file at which this span of blame begins.
    int
    The number of lines in the span, to which the same blame information (author, commit hash, etc.) applies.
  • Method Details

    • getAuthor

      @Nonnull Person getAuthor()
      The author who last updated the lines in the span.
      Returns:
      the author
    • getAuthorTimestamp

      @Nonnull Date getAuthorTimestamp()
      The timestamp at which the author committed the revision.
      Returns:
      the author's commit timestamp
    • getCommitter

      @Nonnull default Person getCommitter()
      The committer who last updated the lines in the span.
      Returns:
      the committer
      Since:
      5.0
    • getCommitterTimestamp

      @Nonnull default Date getCommitterTimestamp()
      The timestamp at which the committer created the revision.
      Returns:
      the committer's timestamp
      Since:
      5.0
    • getCommitId

      @Nonnull String getCommitId()
      The full commit hash for the revision.
      Returns:
      the commit hash
    • getCommitDisplayId

      @Nonnull String getCommitDisplayId()
      A shorted version of the commit hash for the revision, suitable for display.
      Returns:
      the display commit hash
    • getFileName

      @Nonnull String getFileName()
      The name the file had when the lines in the span were updated, which may not match the file's current name.
      Returns:
      the filename when the revision occurred
    • getLineNumber

      int getLineNumber()
      The 1-based line number in the file at which this span of blame begins.
      Returns:
      the line number beginning this span of blame
    • getSpannedLines

      int getSpannedLines()
      The number of lines in the span, to which the same blame information (author, commit hash, etc.) applies. This value will never be negative, but may be 0 for an empty file.
      Returns:
      the number of lines covered by this span of blame information