Class ContractsFromMethod
java.lang.Object
org.checkerframework.framework.util.ContractsFromMethod
A utility class to retrieve pre- and postconditions from a method.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final GenericAnnotatedTypeFactory<?,?, ?, ?> The factory that this ContractsFromMethod is associated with.protected final ExecutableElementThe QualifierArgument.value field/element.
- 
Constructor SummaryConstructorsConstructorDescriptionContractsFromMethod(GenericAnnotatedTypeFactory<?, ?, ?, ?> factory) Creates a ContractsFromMethod for the given factory.
- 
Method SummaryModifier 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.
- 
Field Details- 
qualifierArgumentValueElementThe QualifierArgument.value field/element.
- 
factoryThe factory that this ContractsFromMethod is associated with.
 
- 
- 
Constructor Details- 
ContractsFromMethodCreates a ContractsFromMethod for the given factory.- Parameters:
- factory- the type factory associated with the newly-created ContractsFromMethod
 
 
- 
- 
Method Details- 
getContractsReturns all the contracts on method or constructorexecutableElement.- Parameters:
- executableElement- the method or constructor whose contracts to retrieve
- Returns:
- the contracts on executableElement
 
- 
getPreconditionsReturns the precondition contracts on method or constructorexecutableElement.- Parameters:
- executableElement- the method whose contracts to return
- Returns:
- the precondition contracts on executableElement
 
- 
getPostconditionsReturns the postcondition contracts onexecutableElement.- Parameters:
- executableElement- the method whose contracts to return
- Returns:
- the postcondition contracts on executableElement
 
- 
getConditionalPostconditionspublic 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
 
 
-