public final class CLOptionDescriptor extends Object
CLOptionDescriptor
s, and passes it to
CLArgsParser.CLArgsParser(String[], CLOptionDescriptor[])
.CLArgsParser
,
CLUtil
Modifier and Type | Field and Description |
---|---|
static int |
ARGUMENT_DISALLOWED
Flag to say this option does not take arguments
|
static int |
ARGUMENT_OPTIONAL
Flag to say that the argument is optional
|
static int |
ARGUMENT_REQUIRED
Flag to say that one argument is required
|
static int |
ARGUMENTS_REQUIRED_2
Flag to say this option requires 2 arguments
|
static int |
DUPLICATES_ALLOWED
Flag to say this option may be repeated on the command line
|
Constructor and Description |
---|
CLOptionDescriptor(String name,
int flags,
int id,
String description)
Constructor.
|
CLOptionDescriptor(String name,
int flags,
int id,
String description,
CLOptionDescriptor[] incompatible)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Retrieve textual description.
|
int |
getFlags()
Retrieve flags about option.
|
int |
getId()
Retrieve the id for option.
|
protected int[] |
getIncompatible()
Get the array of incompatible option ids.
|
String |
getName()
Retrieve name of option which is also text for long option.
|
String |
toString() |
public static final int ARGUMENT_REQUIRED
public static final int ARGUMENT_OPTIONAL
public static final int ARGUMENT_DISALLOWED
public static final int ARGUMENTS_REQUIRED_2
public static final int DUPLICATES_ALLOWED
public CLOptionDescriptor(String name, int flags, int id, String description)
name
- the name/long optionflags
- the flagsid
- the id/character optiondescription
- description of option usagepublic CLOptionDescriptor(String name, int flags, int id, String description, CLOptionDescriptor[] incompatible)
name
- the name/long optionflags
- the flagsid
- the id/character optiondescription
- description of option usageincompatible
- descriptors for incompatible optionsprotected final int[] getIncompatible()
public final String getDescription()
public final int getFlags()
public final int getId()
public final String getName()
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.