public class ContractsUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
protected GenericAnnotatedTypeFactory<?,?,?,?> |
factory
The factory that this ContractsUtils is associated with.
|
protected static ContractsUtils |
instance
The currently-used ContractsUtils object.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Contract.ConditionalPostcondition> |
getConditionalPostconditions(ExecutableElement methodElement)
Returns the contracts on method
methodElement. |
Set<Contract> |
getContracts(ExecutableElement executableElement)
Returns all the contracts on method or constructor
executableElement. |
static ContractsUtils |
getInstance(GenericAnnotatedTypeFactory<?,?,?,?> factory)
Returns an instance of the
ContractsUtils class. |
Set<Contract.Postcondition> |
getPostconditions(ExecutableElement executableElement)
Returns the contracts on
executableElement. |
Set<Contract.Precondition> |
getPreconditions(ExecutableElement executableElement)
Returns the contracts on method or constructor
executableElement. |
protected static ContractsUtils instance
protected GenericAnnotatedTypeFactory<?,?,?,?> factory
public static ContractsUtils getInstance(GenericAnnotatedTypeFactory<?,?,?,?> factory)
ContractsUtils class.public Set<Contract> getContracts(ExecutableElement executableElement)
executableElement.executableElement - the method or constructor whose contracts to retrieveexecutableElementpublic Set<Contract.Precondition> getPreconditions(ExecutableElement executableElement)
executableElement.executableElement - the method whose contracts to returnexecutableElementpublic Set<Contract.Postcondition> getPostconditions(ExecutableElement executableElement)
executableElement.executableElement - the method whose contracts to returnexecutableElementpublic Set<Contract.ConditionalPostcondition> getConditionalPostconditions(ExecutableElement methodElement)
methodElement.methodElement - the method whose contracts to returnmethodElement