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

framework.src.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.42.0
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;

import org.checkerframework.framework.util.QualifierPolymorphism;

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

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

* * * * @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 @PolyAll in a type system, simply add it to the * list of supported type qualifiers. * * @see org.checkerframework.checker.nullness.qual.PolyNull * @see org.checkerframework.checker.interning.qual.PolyInterned * @see PolymorphicQualifier * @see 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