public abstract static class ContractsUtils.Contract
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ContractsUtils.Contract.Kind |
Modifier and Type | Field and Description |
---|---|
javax.lang.model.element.AnnotationMirror |
annotation
The annotation that must be on the type of expression as part of this contract.
|
javax.lang.model.element.AnnotationMirror |
contractAnnotation
The annotation that expressed this contract; used for diagnostic messages.
|
java.lang.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(java.lang.String expression,
javax.lang.model.element.AnnotationMirror annotation,
javax.lang.model.element.AnnotationMirror contractAnnotation,
ContractsUtils.Contract.Kind kind)
Creates a new Contract.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
public final java.lang.String expression
"foo"
in
@RequiresNonNull("foo")
.public final javax.lang.model.element.AnnotationMirror annotation
public final javax.lang.model.element.AnnotationMirror contractAnnotation
public final ContractsUtils.Contract.Kind kind
public Contract(java.lang.String expression, javax.lang.model.element.AnnotationMirror annotation, javax.lang.model.element.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