Files
Denis.Zharkov c86c96f5e5 Extract javax.annotations from third-party/foreign-annotations
Later, JSR 305 related classes will be used to be compiled in a separate
jar that will be used to compile Java, but would be absent in the
Kotlin classpath in ForeignAnnotations-related tests

It's necessary to have a proper test for KT-56656
2023-03-16 14:43:04 +00:00

27 lines
706 B
Java

package javax.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.annotation.meta.TypeQualifier;
import javax.annotation.meta.TypeQualifierValidator;
import javax.annotation.meta.When;
@Documented
@TypeQualifier
@Retention(RetentionPolicy.RUNTIME)
public @interface Nonnull {
When when() default When.ALWAYS;
static class Checker implements TypeQualifierValidator<Nonnull> {
public When forConstantValue(Nonnull qualifierqualifierArgument,
Object value) {
if (value == null)
return When.NEVER;
return When.ALWAYS;
}
}
}