public enum OptionPriority extends java.lang.Enum<OptionPriority>
In general, new values for options can only override values with a lower or
equal priority. Option values provided in annotations in an options class are
implicitly at the priority DEFAULT
.
The ordering of the priorities is the source-code order. This is consistent
with the automatically generated compareTo
method as specified by the
Java Language Specification. DO NOT change the source-code order of these
values, or you will break code that relies on the ordering.
Enum Constant and Description |
---|
COMMAND_LINE
For options coming from the command line.
|
COMPUTED_DEFAULT
Overrides default options at runtime, while still allowing the values to be
overridden manually.
|
DEFAULT
The priority of values specified in the
Option annotation. |
INVOCATION_POLICY
For options coming from invocation policy.
|
RC_FILE
For options coming from a configuration file or rc file.
|
SOFTWARE_REQUIREMENT
This priority can be used to unconditionally override any user-provided options.
|
Modifier and Type | Method and Description |
---|---|
static OptionPriority |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static OptionPriority[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OptionPriority DEFAULT
Option
annotation. This
should never be specified in calls to OptionsParser.parse(java.lang.String...)
.public static final OptionPriority COMPUTED_DEFAULT
public static final OptionPriority RC_FILE
public static final OptionPriority COMMAND_LINE
public static final OptionPriority INVOCATION_POLICY
public static final OptionPriority SOFTWARE_REQUIREMENT
public static OptionPriority[] values()
for (OptionPriority c : OptionPriority.values()) System.out.println(c);
public static OptionPriority valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null