public class CommandLineOptionSet
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
int |
ANALYSIS |
int |
CODEGEN |
int |
TRANSFORM |
int |
UTILITY |
| Constructor and Description |
|---|
CommandLineOptionSet()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int type,
java.lang.String name,
java.lang.String usage)
Registers a new option with the given type and usage information.
|
void |
add(int type,
java.lang.String name,
java.lang.String arg,
java.lang.String usage)
Registers a new option with the given type, argument, and usage.
|
void |
add(int type,
java.lang.String name,
java.lang.String value,
java.lang.String arg,
java.lang.String usage)
Registers a new option with the given type, value, argument, and usage.
|
void |
add(int type,
java.lang.String name,
java.lang.String value,
java.lang.String value_on,
java.lang.String arg,
java.lang.String usage)
Registers a new option with the given type, value, turn-on value,
argument, and usage.
|
void |
add(java.lang.String name,
java.lang.String usage)
Registers a new UTILITY option with the given usage information.
|
void |
add(java.lang.String name,
java.lang.String arg,
java.lang.String usage)
Registers a new UTILITY option with the given argument and usage
information.
|
boolean |
contains(java.lang.String name)
Checks if the option set contains an option with the specified name.
|
java.lang.String |
dumpOptions()
Returns a string dump of the options.
|
void |
exclude(java.lang.String name,
java.lang.String hir_type,
java.lang.String hir_name)
Excludes the specified IR type and name in the inclusion set for the
specified option name.
|
int |
getType(java.lang.String name)
Returns the type of the specified option name.
|
java.lang.String |
getUsage()
Returns the usage information for the entire option set.
|
java.lang.String |
getUsage(int type)
Returns the usage information for the specified option type.
|
java.lang.String |
getValue(java.lang.String name)
Returns the value of the specified option name.
|
void |
include(java.lang.String name,
java.lang.String hir_type,
java.lang.String hir_name)
Includes the specified IR type and name in the inclusion set for the
specified option name.
|
boolean |
isExcluded(java.lang.String name,
java.lang.String hir_type,
java.lang.String hir_name) |
boolean |
isIncluded(java.lang.String name,
java.lang.String hir_type,
java.lang.String hir_name) |
void |
setValue(java.lang.String name)
Copies the default value from predefined one.
|
void |
setValue(java.lang.String name,
java.lang.String value)
Sets a new value for the specified option name.
|
public final int UTILITY
public final int ANALYSIS
public final int TRANSFORM
public final int CODEGEN
public void add(java.lang.String name,
java.lang.String usage)
name - the name of the option.usage - the usage of the option.public void add(java.lang.String name,
java.lang.String arg,
java.lang.String usage)
name - the name of the option.arg - the argument allowed for the option.usage - the usage of the option.public void add(int type,
java.lang.String name,
java.lang.String usage)
type - the category to which the option belongs.name - the name of the option.usage - the usage of the option.public void add(int type,
java.lang.String name,
java.lang.String arg,
java.lang.String usage)
type - the category to which the option belongs.name - the name of the option.arg - the argument allowed for the option.usage - the usage of the option.public void add(int type,
java.lang.String name,
java.lang.String value,
java.lang.String arg,
java.lang.String usage)
type - the category to which the option belongs.name - the name of the option.value - the default value of the option.arg - the argument allowed for the option.usage - the usage of the option.public void add(int type,
java.lang.String name,
java.lang.String value,
java.lang.String value_on,
java.lang.String arg,
java.lang.String usage)
type - the category to which the option belongs.name - the name of the option.value - the default value of the option.value_on - the default value when the option is turned on without a
valuearg - the argument allowed for the option.usage - the usage of the option.public boolean contains(java.lang.String name)
name - the name to be searched for.public java.lang.String dumpOptions()
public java.lang.String getUsage()
public java.lang.String getUsage(int type)
public java.lang.String getValue(java.lang.String name)
public void setValue(java.lang.String name,
java.lang.String value)
public void setValue(java.lang.String name)
public int getType(java.lang.String name)
public void include(java.lang.String name,
java.lang.String hir_type,
java.lang.String hir_name)
name - the affected option name.hir_type - the IR type.hir_name - the IR name.public void exclude(java.lang.String name,
java.lang.String hir_type,
java.lang.String hir_name)
name - the affected option name.hir_type - the IR type.hir_name - the IR name.public boolean isIncluded(java.lang.String name,
java.lang.String hir_type,
java.lang.String hir_name)
public boolean isExcluded(java.lang.String name,
java.lang.String hir_type,
java.lang.String hir_name)