Method from com.sun.tools.javac.util.Options Detail: |
public String get(String name) {
return values.get(name);
}
Get the value for an undocumented option. |
public String get(OptionName name) {
return values.get(name.optionName);
}
Get the value for an option. |
public boolean getBoolean(String name) {
return getBoolean(name, false);
}
Get the boolean value for an option, patterned after Boolean.getBoolean,
essentially will return true, iff the value exists and is set to "true". |
public boolean getBoolean(String name,
boolean defaultValue) {
String value = get(name);
return (value == null) ? defaultValue : Boolean.parseBoolean(value);
}
Get the boolean with a default value if the option is not set. |
public static Options instance(Context context) {
Options instance = context.get(optionsKey);
if (instance == null)
instance = new Options(context);
return instance;
}
Get the Options instance for this context. |
public boolean isSet(String name) {
return (values.get(name) != null);
}
Check if the value for an undocumented option has been set. |
public boolean isSet(OptionName name) {
return (values.get(name.optionName) != null);
}
Check if the value for an option has been set. |
public boolean isSet(OptionName name,
String value) {
return (values.get(name.optionName + value) != null);
}
Check if the value for a choice option has been set to a specific value. |
public boolean isUnset(String name) {
return (values.get(name) == null);
}
Check if the value for an undocumented option has not been set. |
public boolean isUnset(OptionName name) {
return (values.get(name.optionName) == null);
}
Check if the value for an option has not been set. |
public boolean isUnset(OptionName name,
String value) {
return (values.get(name.optionName + value) == null);
}
Check if the value for a choice option has not been set to a specific value. |
public Set<String> keySet() {
return values.keySet();
}
|
public boolean lint(String s) {
// return true if either the specific option is enabled, or
// they are all enabled without the specific one being
// disabled
return
isSet(XLINT_CUSTOM, s) ||
(isSet(XLINT) || isSet(XLINT_CUSTOM, "all")) &&
isUnset(XLINT_CUSTOM, "-" + s);
}
Check for a lint suboption. |
public void put(String name,
String value) {
values.put(name, value);
}
|
public void put(OptionName name,
String value) {
values.put(name.optionName, value);
}
|
public void putAll(Options options) {
values.putAll(options.values);
}
|
public void remove(String name) {
values.remove(name);
}
|
public int size() {
return values.size();
}
|