checkers.quals.Dependent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jme3-core Show documentation
Show all versions of jme3-core Show documentation
jMonkeyEngine is a 3D game engine for adventurous Java developers
The newest version!
package checkers.quals;
import java.lang.annotation.Annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* 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 extends Annotation> result();
/**
* The qualifier class of the receiver that causes the {@code result}
* qualifier to be applied.
*/
Class extends Annotation> when();
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy