Class InitializedFieldsAnnotatedTypeFactory.InitializedFieldsContractsFromMethod
java.lang.Object
org.checkerframework.framework.util.ContractsFromMethod
org.checkerframework.common.initializedfields.InitializedFieldsAnnotatedTypeFactory.InitializedFieldsContractsFromMethod
- Enclosing class:
InitializedFieldsAnnotatedTypeFactory
public class InitializedFieldsAnnotatedTypeFactory.InitializedFieldsContractsFromMethod
extends ContractsFromMethod
A subclass of ContractsFromMethod that adds a postcondition contract to each constructor,
requiring that it initializes all fields.
-
Field Summary
Fields inherited from class org.checkerframework.framework.util.ContractsFromMethod
factory, qualifierArgumentValueElement -
Constructor Summary
ConstructorsConstructorDescriptionInitializedFieldsContractsFromMethod(GenericAnnotatedTypeFactory<?, ?, ?, ?> factory) Creates an InitializedFieldsContractsFromMethod for the given factory. -
Method Summary
Modifier and TypeMethodDescriptiongetPostconditions(ExecutableElement executableElement) Returns the postcondition contracts onexecutableElement.Methods inherited from class org.checkerframework.framework.util.ContractsFromMethod
getConditionalPostconditions, getContracts, getPreconditions
-
Constructor Details
-
InitializedFieldsContractsFromMethod
Creates an InitializedFieldsContractsFromMethod for the given factory.- Parameters:
factory- the type factory associated with the newly-created ContractsFromMethod
-
-
Method Details
-
getPostconditions
Description copied from class:ContractsFromMethodReturns the postcondition contracts onexecutableElement.- Overrides:
getPostconditionsin classContractsFromMethod- Parameters:
executableElement- the method whose contracts to return- Returns:
- the postcondition contracts on
executableElement
-