@Retention(value=CLASS) @Target(value={METHOD,FIELD,PARAMETER,LOCAL_VARIABLE,TYPE_USE}) public @interface Negative
@Negative indicates that the annotated value must be strictly below
zero. It is intended for library maintainers and tooling that check numeric
contracts.
Retention and effect: Stored in the class file with no direct runtime effect unless Chronicle tooling interprets it.
@Negative int errorCode;
| Annotation | Constraint |
|---|---|
@Negative | val < 0 |
NonPositive | val <= 0 |
NonNegative | val >= 0 |
Positive | val > 0 |
void setLevel(@Negative int level) {
assert level < 0;
}
These annotations are advisory and may be enforced with
ChronicleAssertions or Java assert.
NonNegative,
NonPositive,
Positive,
Rangepublic abstract String value
Copyright © 2026 Chronicle Software Ltd. All rights reserved.