public abstract static class ContractsUtils.Contract extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ContractsUtils.Contract.Kind |
| Modifier and Type | Field and Description |
|---|---|
AnnotationMirror |
annotation
The annotation that must be on the type of expression as part of this contract.
|
AnnotationMirror |
contractAnnotation
The annotation that expressed this contract; used for diagnostic messages.
|
String |
expression
The expression for which the condition must hold, such as
"foo" in
@RequiresNonNull("foo"). |
ContractsUtils.Contract.Kind |
kind
The kind of contract: precondition, postcondition, or conditional postcondition.
|
| Constructor and Description |
|---|
Contract(String expression,
AnnotationMirror annotation,
AnnotationMirror contractAnnotation,
ContractsUtils.Contract.Kind kind)
Creates a new Contract.
|
public final String expression
"foo" in
@RequiresNonNull("foo").public final AnnotationMirror annotation
public final AnnotationMirror contractAnnotation
public final ContractsUtils.Contract.Kind kind
public Contract(String expression, AnnotationMirror annotation, AnnotationMirror contractAnnotation, ContractsUtils.Contract.Kind kind)
expression - the Java expression that should have a type qualifierannotation - the type qualifier that expression should havecontractAnnotation - the pre- or post-condition annotation that the programmer
wrote; used for diagnostic messageskind - precondition, postcondition, or conditional postcondition