All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.checkerframework.framework.qual.RelevantJavaTypes Maven / Gradle / Ivy

Go to download

The Checker Framework enhances Java's type system to make it more powerful and useful. This lets software developers detect and prevent errors in their Java programs. The Checker Framework includes compiler plug-ins ("checkers") that find bugs or verify their absence. It also permits you to write your own compiler plug-ins.

There is a newer version: 3.43.0
Show newest version
package org.checkerframework.framework.qual;

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;

/**
 * An annotation on a SourceChecker subclass to specify which Java types are processed by the
 * checker. In source code, the checker's type qualifiers may only appear on the given types and
 * their subtypes. If a checker is not annotated with this annotation, then the checker's qualifiers
 * may appear on any type.
 *
 * 

This restriction is coarse-grained in that it applies to all type annotations for a given * checker. To have different restrictions for different Java types, override {@code * org.checkerframework.common.basetype.BaseTypeVisitor#visitAnnotatedType(List, Tree)}. * *

This is orthogonal to Java's {@code @Target} annotation; each enforces a different type of * restriction on what can be written in source code. * * @checker_framework.manual #creating-relevant-java-types Relevant Java types */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Inherited public @interface RelevantJavaTypes { /** * Classes where a type annotation supported by this checker may be written. * *

{@code Object[].class} means that the checker processes all array types. No distinction * among array types is currently made, and no other array class should be supplied to * {@code @RelevantJavaTypes}. * *

If a checker processes both primitive and boxed types, both must be specified separately, * for example as {@code int.class} and {@code Integer.class}. * * @return classes where a type annotation supported by this checker may be written */ Class[] value(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy