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

framework.src.org.checkerframework.framework.qual.Dependent 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.*;

/**
 * Refines the qualified type of the annotated field or variable based on the
 * qualified type of the receiver.  The annotation declares a relationship
 * between multiple type qualifier hierarchies.
 *
 * 

Example: * Consider a field, {@code lock}, that is only initialized if the * enclosing object (the receiver), is marked as {@code ThreadSafe}. * Such a field can be declared as: * *


 *   private @Nullable @Dependent(result=NonNull.class, when=ThreadSafe.class)
 *     Lock lock;
 * 
*/ @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER}) public @interface Dependent { /** * The class of the refined qualifier to be applied. */ Class result(); /** * The qualifier class of the receiver that causes the {@code result} * qualifier to be applied. */ Class when(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy