Interface ContractsFromMethod
- All Known Implementing Classes:
DefaultContractsFromMethod
,NoContractsFromMethod
public interface ContractsFromMethod
Interface to retrieve pre- and postconditions from a method.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetConditionalPostconditions
(ExecutableElement methodElement) Returns the conditional postcondition contracts on methodmethodElement
.getContracts
(ExecutableElement executableElement) Returns all the contracts on method or constructorexecutableElement
.getPostconditions
(ExecutableElement executableElement) Returns the postcondition contracts onexecutableElement
.getPreconditions
(ExecutableElement executableElement) Returns the precondition contracts on method or constructorexecutableElement
.
-
Method Details
-
getContracts
Returns all the contracts on method or constructorexecutableElement
.- Parameters:
executableElement
- the method or constructor whose contracts to retrieve- Returns:
- the contracts on
executableElement
-
getPreconditions
Returns the precondition contracts on method or constructorexecutableElement
.- Parameters:
executableElement
- the method whose contracts to return- Returns:
- the precondition contracts on
executableElement
-
getPostconditions
Returns the postcondition contracts onexecutableElement
.- 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 methodmethodElement
.- Parameters:
methodElement
- the method whose contracts to return- Returns:
- the conditional postcondition contracts on
methodElement
-