org.checkerframework.common.value.qual.MinLenFieldInvariant Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of checker-qual Show documentation
Show all versions of checker-qual Show documentation
checker-qual contains annotations (type qualifiers) that a programmer
writes to specify Java code for type-checking by the Checker Framework.
The newest version!
package org.checkerframework.common.value.qual;
import org.checkerframework.framework.qual.FieldInvariant;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* A specialization of {@link FieldInvariant} for specifying the minimum length of an array. A class
* can be annotated with both this annotation and a {@link FieldInvariant} annotation.
*
* @checker_framework.manual #field-invariants Field invariants
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Inherited
public @interface MinLenFieldInvariant {
/**
* Min length of the array. Must be greater than the min length of the array as declared in the
* superclass.
*/
int[] minLen();
/**
* The field that has an array length qualifier in the class on which the field invariant is
* written. The field must be final and declared in a superclass.
*/
String[] field();
}