@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 |
---|---|
String[] |
map
Java expressions that are maps, each of which contains each of the expressions' value on
successful method termination.
|
String[] |
value
Java expressions that are keys in the given maps on successful method termination.
|
public abstract String[] value
public abstract String[] map