@Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Incubating @ClassInvariant @Repeatable(Invariants.class) @AnnotationProcessorImplementation(ClassInvariantAnnotationProcessor.class) public @interface Invariant
Represents a class-invariant.
The class-invariant defines assertions holding during the entire objects life-time.
Class-invariants are verified at runtime at the following pointcuts:
Whenever a class has a parent which itself specifies a class-invariant, that class-invariant expression is combined with the actual class's invariant (by using a logical AND).