Create tests for TYPE_USE nullability annotations

- tests and declarations for checkerframework has been moved,
because they only Java 8 targeted
- tests for eclipse annotations has been just copied,
because there are two jars: one for Java 8 and other for earlier versions
This commit is contained in:
Denis Zharkov
2016-03-16 11:52:29 +03:00
parent 3f3c2bb272
commit a644dd3ae9
13 changed files with 237 additions and 11 deletions
@@ -1,41 +0,0 @@
package org.checkerframework.checker.nullness.qual;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* {@link NonNull} is a type annotation that indicates that an expression is
* never {@code null}.
*
* <p>
* For fields of a class, the {@link NonNull} annotation indicates that this
* field is never {@code null}
* <em>after the class has been fully initialized</em>. Class initialization is
* controlled by the Freedom Before Commitment type system, see
* {@link InitializationChecker} for more details.
*
* <p>
* For static fields, the {@link NonNull} annotation indicates that this field
* is never {@code null} <em>after the containing class is initialized</em>.
*
* <p>
* This annotation is rarely written in source code, because it is the default.
*
* <p>
* This annotation is associated with the {@link AbstractNullnessChecker}.
*
* @see Nullable
* @see MonotonicNonNull
* @see AbstractNullnessChecker
* @checker_framework.manual #nullness-checker Nullness Checker
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
// TODO: originally it's target was: TYPE_USE, TYPE_PARAMETER
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE })
public @interface NonNull {
}
@@ -1,28 +0,0 @@
package org.checkerframework.checker.nullness.qual;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* {@link Nullable} is a type annotation that indicates that the value is not
* known to be non-null (see {@link NonNull}). Only if an expression has a
* {@link Nullable} type may it be assigned {@code null}.
*
* <p>
* This annotation is associated with the {@link AbstractNullnessChecker}.
*
* @see NonNull
* @see MonotonicNonNull
* @see AbstractNullnessChecker
* @checker_framework.manual #nullness-checker Nullness Checker
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
// TODO: originally it's target was: TYPE_USE, TYPE_PARAMETER
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE })
public @interface Nullable {
}