Package org.jline.builtins
Class Options
java.lang.Object
org.jline.builtins.Options
Yet another GNU long options parser. This one is configured by parsing its Usage string.
Code coming from Apache Felix Gogo Shell
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Exception thrown when using the--help
option on a built-in command. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String[]
private final String
private String
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private final String[]
static final String
private boolean
private static final Pattern
private static final String
private final String[]
private boolean
private static final Pattern
private static final String
private int
private String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
args()
static Options
static Options
static Options
static Options
static Options
static Options
int
getObjectList
(String name) boolean
private void
parse option spec.private void
reset()
setOptionsFirst
(boolean optionsFirst) setStopOnBadOption
(boolean stopOnBadOption) toString()
usage()
void
usage
(PrintStream err) usageError
(String s) Prints usage message and returns IllegalArgumentException, for you to throw.
-
Field Details
-
NL
-
regex
- See Also:
-
GROUP_SHORT_OPT_1
private static final int GROUP_SHORT_OPT_1- See Also:
-
GROUP_SHORT_OPT_2
private static final int GROUP_SHORT_OPT_2- See Also:
-
GROUP_LONG_OPT_1
private static final int GROUP_LONG_OPT_1- See Also:
-
GROUP_ARG_1
private static final int GROUP_ARG_1- See Also:
-
GROUP_LONG_OPT_2
private static final int GROUP_LONG_OPT_2- See Also:
-
GROUP_DEFAULT
private static final int GROUP_DEFAULT- See Also:
-
parser
-
uname
-
unmodifiableOptSet
-
unmodifiableOptArg
-
optSet
-
optArg
-
optName
-
optAlias
-
xargs
-
args
-
UNKNOWN
- See Also:
-
usageName
-
usageIndex
private int usageIndex -
spec
-
gspec
-
defOpts
-
defArgs
-
error
-
optionsFirst
private boolean optionsFirst -
stopOnBadOption
private boolean stopOnBadOption
-
-
Constructor Details
-
Options
-
-
Method Details
-
compile
-
compile
-
compile
-
compile
-
compile
-
compile
-
setStopOnBadOption
-
setOptionsFirst
-
isSet
-
getObject
-
getObjectList
-
getList
-
addArg
-
get
-
getNumber
-
argObjects
-
args
-
usage
-
usage
-
usageError
Prints usage message and returns IllegalArgumentException, for you to throw.- Parameters:
s
- the message to display- Returns:
- an exception with the generated message
-
parseSpec
parse option spec. -
reset
private void reset() -
parse
-
parse
-
parse
-
parse
-
toString
-