Enum Class DiffError

java.lang.Object
java.lang.Enum<DiffError>
org.variantsync.diffdetective.diff.result.DiffError
All Implemented Interfaces:
Serializable, Comparable<DiffError>, Constable

public enum DiffError extends Enum<DiffError>
Describes an error that occurred when processing a text-based diff.
  • Enum Constant Details

    • COMMIT_HAS_NO_PARENTS

      public static final DiffError COMMIT_HAS_NO_PARENTS
      A commit has no parents and thus no real diff.
    • JGIT_ERROR

      public static final DiffError JGIT_ERROR
      Some internal error occurred when operating JGit. The error is not further specified or unknown.
    • FILE_NOT_FOUND

      public static final DiffError FILE_NOT_FOUND
      The patch of a file was requested, but the file was not found in a git diff.
    • COULD_NOT_OBTAIN_FULLDIFF

      public static final DiffError COULD_NOT_OBTAIN_FULLDIFF
      An error which occurred when obtaining the full diff from a local diff.
    • NOT_ALL_ANNOTATIONS_CLOSED

      public static final DiffError NOT_ALL_ANNOTATIONS_CLOSED
      A preprocessor block was opened but not closed. Typically, this occurs when an #endif is missing.
    • ENDIF_WITHOUT_IF

      public static final DiffError ENDIF_WITHOUT_IF
      A file or patch contained an expression that closes an annotation block (typically an #endif) but there is no block to close.
    • MLMACRO_WITHIN_MLMACRO

      public static final DiffError MLMACRO_WITHIN_MLMACRO
      A multiline macro was defined within a multiline macro.
    • ELSE_OR_ELIF_WITHOUT_IF

      public static final DiffError ELSE_OR_ELIF_WITHOUT_IF
      An #else or #elif expression has no corresponding #if (or #ifdef, ...) expression.
    • ELSE_AFTER_ELSE

      public static final DiffError ELSE_AFTER_ELSE
      An #else expression is followed by another #else expression which has no semantics.
    • IF_WITHOUT_CONDITION

      public static final DiffError IF_WITHOUT_CONDITION
      A condition annotation is missing an expression. This typically occurs when an #if macro has no arguments.
    • INVALID_MACRO_NAME

      public static final DiffError INVALID_MACRO_NAME
      Unknown macro name which was identified as a conditional macro. Example: #iflol
    • INVALID_DIFF

      public static final DiffError INVALID_DIFF
      Empty line in a diff. All lines in a diff need at least one symbol (the DiffType) in it.
    • INVALID_LINE_CONTINUATION

      public static final DiffError INVALID_LINE_CONTINUATION
      A line continuation without a following line.
    • UNPARSEABLE_FORMULA

      public static final DiffError UNPARSEABLE_FORMULA
      A line with an unparseable formula.
  • Field Details

    • message

      private final String message
  • Constructor Details

    • DiffError

      private DiffError(String message)
  • Method Details

    • values

      public static DiffError[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DiffError valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getMessage

      public String getMessage()
    • fromMessage

      public static Optional<DiffError> fromMessage(String message)
    • toString

      public String toString()
      Overrides:
      toString in class Enum<DiffError>