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

org.checkerframework.framework.qual.PolyAll 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.0.0-b2
Show newest version
package org.checkerframework.framework.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;

/**
 * A polymorphic type qualifier that varies over all type hierarchies. Writing {@code @PolyAll} is
 * equivalent to writing a polymorphic qualifier for every type system.
 *
 * 

The {@code @PolyAll} annotation applies to every type qualifier hierarchy for which no * explicit qualifier is written. For example, a declaration like {@code @PolyAll @NonNull String s} * is polymorphic over every type system except the nullness type system, for which the * type is fixed at {@code @NonNull}. * * *

Implementation note: {@code @PolyAll} only works for a given type system if that type system * already has its own polymorphic qualifier, such as {@code @PolyNull} or {@code @PolyRegex}. * Therefore, every type system should define a polymorphic qualifier. Then, to support * {@code @PolyAll} in a type system, simply add it to the list of supported type qualifiers. * * @see org.checkerframework.framework.type.poly.QualifierPolymorphism * @checker_framework.manual #polyall The @PolyAll qualifier applies to every type system */ @Documented @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @PolymorphicQualifier public @interface PolyAll { // TODO: support multiple variables using an id, then uncomment some Javadoc // int value() default 0; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy