checkers.quals
Annotation Type Dependent


@Documented
@Retention(value=RUNTIME)
public @interface Dependent

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

Example: Consider a field, lock, that is only initialized if the enclosing object, receiver, is marked as ThreadSafe. Such field can be declared as:


   private @Nullable @Dependent(result=NonNull.class, when=ThreadSafe.class)
     Lock lock;
 


Required Element Summary
 Class<? extends Annotation> result
          The class of the refined qualifier to be applied.
 Class<? extends Annotation> when
          The qualifier class of the receiver that cause the result qualifier to be applied.
 

Element Detail

result

public abstract Class<? extends Annotation> result
The class of the refined qualifier to be applied.


when

public abstract Class<? extends Annotation> when
The qualifier class of the receiver that cause the result qualifier to be applied.