|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 必須 | オプション | 詳細: 要素 |
@Documented @Retention(value=RUNTIME) public @interface Dependent
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, lock
, that is only initialized if the
enclosing object (the receiver), is marked as ThreadSafe
.
Such a field can be declared as:
private @Nullable @Dependent(result=NonNull.class, when=ThreadSafe.class)
Lock lock;
必須要素の概要 | |
---|---|
java.lang.Class<? extends java.lang.annotation.Annotation> |
result
The class of the refined qualifier to be applied. |
java.lang.Class<? extends java.lang.annotation.Annotation> |
when
The qualifier class of the receiver that causes the result
qualifier to be applied. |
要素の詳細 |
---|
public abstract java.lang.Class<? extends java.lang.annotation.Annotation> result
public abstract java.lang.Class<? extends java.lang.annotation.Annotation> when
result
qualifier to be applied.
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 必須 | オプション | 詳細: 要素 |