Class IntegrityError

java.lang.Object
java.lang.Throwable
java.lang.Error
io.github.thecsdev.tcdcommons.api.util.integrity.IntegrityError
All Implemented Interfaces:
Serializable

public class IntegrityError extends Error
Thrown to indicate that a Class or a set of Classes have been tampered with. This is a custom Error type that extends the standard Error class.

An IntegrityError includes that one or more Classes that were affected by an integrity violation. The most common cause of integrity violations are things like unwanted code injections.

The array of affected Classes can be retrieved using the getAffectedClasses() method.

See Also:
  • Field Details

    • affectedClasses

      protected final Class<?>[] affectedClasses
  • Constructor Details

    • IntegrityError

      public IntegrityError()
    • IntegrityError

      public IntegrityError(Class<?>... affectedClasses)
    • IntegrityError

      public IntegrityError(String message, Class<?>... affectedClasses)
  • Method Details

    • getAffectedClasses

      @Nullable public final @Nullable Class<?>[] getAffectedClasses()
      Returns the Classes that were affected by the integrity violation.
      Returns:
      An array of Classes that were affected, or null if no Classes were listed.