Class EnsuresCalledMethodOnExceptionContract

java.lang.Object
org.checkerframework.checker.calledmethods.EnsuresCalledMethodOnExceptionContract

public class EnsuresCalledMethodOnExceptionContract extends Object
A postcondition contract that a method calls the given method on the given expression when that method throws an exception.

Instances of this class are plain old immutable data with no interesting behavior.

See Also:
  • Constructor Details

    • EnsuresCalledMethodOnExceptionContract

      public EnsuresCalledMethodOnExceptionContract(String expression, String method)
      Create a new EnsuredCalledMethodOnException. Usually this should be constructed from a EnsuresCalledMethodsOnException appearing in the source code.
      Parameters:
      expression - the expression described by this postcondition
      method - the method this postcondition promises to call
  • Method Details

    • getExpression

      public String getExpression()
      The expression described by this postcondition.
      Returns:
      the expression described by this postcondition
    • getMethod

      public String getMethod()
      The method this postcondition promises to call.
      Returns:
      the method this postcondition promises to call
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object