Interface ContractsFromMethod

All Known Implementing Classes:
DefaultContractsFromMethod, NoContractsFromMethod

public interface ContractsFromMethod
Interface to retrieve pre- and postconditions from a method.
See Also:
  • Method Details

    • getContracts

      Set<Contract> getContracts(ExecutableElement executableElement)
      Returns all the contracts on method or constructor executableElement.
      Parameters:
      executableElement - the method or constructor whose contracts to retrieve
      Returns:
      the contracts on executableElement
    • getPreconditions

      Set<Contract.Precondition> getPreconditions(ExecutableElement executableElement)
      Returns the precondition contracts on method or constructor executableElement.
      Parameters:
      executableElement - the method whose contracts to return
      Returns:
      the precondition contracts on executableElement
    • getPostconditions

      Set<Contract.Postcondition> getPostconditions(ExecutableElement executableElement)
      Returns the postcondition contracts on executableElement.
      Parameters:
      executableElement - the method whose contracts to return
      Returns:
      the postcondition contracts on executableElement
    • getConditionalPostconditions

      Set<Contract.ConditionalPostcondition> getConditionalPostconditions(ExecutableElement methodElement)
      Returns the conditional postcondition contracts on method methodElement.
      Parameters:
      methodElement - the method whose contracts to return
      Returns:
      the conditional postcondition contracts on methodElement