@Documented @Retention(value=RUNTIME) @Target(value={METHOD,CONSTRUCTOR}) @InheritedAnnotation public @interface EnsuresKeyFor
Consider the following method from java.util.Map
:
@EnsuresKeyFor(value="key", map="this") public @Nullable V put(K key, V value) { ... }
This method guarantees that key
has type @KeyFor("this")
after the method
returns.
KeyFor
,
EnsuresKeyForIf
Modifier and Type | Required Element and Description |
---|---|
java.lang.String[] |
map
Java expressions that are maps, each of which contains each of the expressions' value on
successful method termination.
|
java.lang.String[] |
value
Java expressions that are keys in the given maps on successful method termination.
|
public abstract java.lang.String[] value
public abstract java.lang.String[] map