public @interface KeyFor
The value of the annotation should be the reference name of the map. The following declaration for example:
Map<String, String> config = ...;
@KeyFor("config") String key = "HOSTNAME";
String hostname = config.get(key); // known to be non-null
indicates that "HOSTNAME" is a key in config. The Nullness
checker deduce this information to deduce that hostname
reference
is a nonnull reference.
Limitation: The Nullness checker trusts the user and doesn't validate the annotations. Future releases will check for the presence of the key in the map (when possible).
public abstract String[] value