public abstract class BaseConfigVariable extends Object implements IOptionSource
ConfigVariable and
RepeatableConfigVariable. This abstract class encapsulates all
of the functionality that any ConfigVariable must have that does not
involve "setting" it.
Consumers of this class must implement the addToCommandline
method.| Modifier and Type | Field and Description |
|---|---|
protected OptionSpec |
spec
The
OptionSpec describing the names that this ConfigVariable should match. |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseConfigVariable(OptionSpec spec)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addToCommandline(org.apache.tools.ant.types.Commandline cmdline)
Adds arguments to the end of
cmdline corresponding to the state of this variable. |
OptionSpec |
getSpec() |
boolean |
matches(String option)
Returns the result of calling matches() on
DEFAULT_SCRIPT_LIMITS with option as the argument. |
protected final OptionSpec spec
OptionSpec describing the names that this ConfigVariable should match.protected BaseConfigVariable(OptionSpec spec)
Creates a Configuration Variable with the specified OptionSpec.
public abstract void addToCommandline(org.apache.tools.ant.types.Commandline cmdline)
cmdline corresponding to the state of this variable.addToCommandline in interface IOptionSourcecmdline - The Commandline object to which arguments correspond to this option should be addedpublic OptionSpec getSpec()
public boolean matches(String option)
DEFAULT_SCRIPT_LIMITS with option as the argument.option matches DEFAULT_SCRIPT_LIMITS, and false otherwise.Copyright © 2016 The Apache Software Foundation. All rights reserved.