checker.src.org.checkerframework.checker.tainting.qual.Var Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of checker Show documentation
Show all versions of checker Show documentation
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.
package org.checkerframework.checker.tainting.qual;
import java.lang.annotation.ElementType;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.checkerframework.qualframework.poly.SimpleQualifierParameterAnnotationConverter;
import org.checkerframework.qualframework.poly.qual.Wildcard;
/**
* Var is a qualifier parameter use.
*
*
* {@code
*
* {@literal @}TaintingParam("aParam")
* class A {
* }
*
* {@literal @}TaintingParam("bParam")
* class B {
* {@literal @}Var(arg="bParam", param="aParam") A f1;
* {@literal @}Var(arg="bParam", param="aParam", wildcard=Wildcard.EXTENDS) A f2;
* }
* }
*
* is equivalent to:
*
*
* {@code
* class A«aParam» {
*
* }
* class B«bParam» {
* A«aParam=bParam» a;
* A«aParam=? extends bParam» b;
* }
*
* }
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@Repeatable(MultiVar.class)
public @interface Var {
/**
* Which parameter this @Var is a use of.
*/
String arg() default SimpleQualifierParameterAnnotationConverter.PRIMARY_TARGET;
/**
* The name of the parameter to set.
*/
String param() default SimpleQualifierParameterAnnotationConverter.PRIMARY_TARGET;
/**
* Specify that this use is a wildcard with a bound.
*/
Wildcard wildcard() default Wildcard.NONE;
}