public class ConfigurationInfo extends Object
Constructor and Description |
---|
ConfigurationInfo()
This ctor is used when everything can be introspected off the setter method, or else
when the names/types are provided by method overrides rather than ctor arguments
|
ConfigurationInfo(int argcount)
Simple ctor for restricting the number of arguments.
|
ConfigurationInfo(int argcount,
String argname)
Use this ctor when you want to set a single list of some number of identically named args
|
ConfigurationInfo(int argcount,
String[] argnames)
More unusual ctor, this would let you have the first few args named one thing, the rest named something else.
|
ConfigurationInfo(String[] argnames)
Simple ctor for naming the arguments.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowMultiple()
Variables are generally only allowed to be set once in a given file/cmdline.
|
boolean |
doChecksum() |
String[] |
getAliases()
Return an array of other names for this variable.
|
int |
getArgCount() |
String |
getArgName(int argnum)
Return the name of each parameter.
|
Class |
getArgType(int argnum)
Return the type of each parameter.
|
CompilerMessage.CompilerWarning |
getDeprecatedMessage() |
String |
getDeprecatedReplacement() |
String |
getDeprecatedSince() |
protected Method |
getGetterMethod() |
String[] |
getPrerequisites()
Return variable names that should be set before this one.
|
protected Method |
getSetterMethod() |
String[] |
getSoftPrerequisites()
Prerequisites which should be set before this one if they exist
|
boolean |
isAdvanced()
Override to make a variable hidden by default (i.e. you need -advanced on the cmdline)
|
boolean |
isDeprecated() |
boolean |
isDisplayed()
Override to prevent printing when dumping configuration
|
boolean |
isGreedy()
Magic used by the command line configurator only at the moment to decide whether this
variable should eat all subsequent arguments.
|
boolean |
isHidden()
Override to make a variable completely hidden
|
boolean |
isPath() |
boolean |
isRequired()
If a variable -must- be set, override this
|
protected void |
setGetterMethod(Method getter) |
protected void |
setSetterMethod(Method setter) |
public ConfigurationInfo()
public ConfigurationInfo(int argcount)
argcount
- number of args, -1 for an infinite listpublic ConfigurationInfo(String[] argnames)
argnames
- list of argnames, argcount will default to # of elementspublic ConfigurationInfo(int argcount, String argname)
argcount
- number of arguments (-1 for infinite)argname
- name of each argumentpublic ConfigurationInfo(int argcount, String[] argnames)
argcount
- number of argumentsargnames
- array of argument namespublic final int getArgCount()
public String getArgName(int argnum)
argnum
- public final Class getArgType(int argnum)
argnum
- public String[] getPrerequisites()
public String[] getSoftPrerequisites()
public boolean allowMultiple()
public String[] getAliases()
public boolean isAdvanced()
public boolean isHidden()
public boolean isDisplayed()
public boolean isRequired()
public boolean isGreedy()
public boolean isPath()
public boolean doChecksum()
public CompilerMessage.CompilerWarning getDeprecatedMessage()
public boolean isDeprecated()
public String getDeprecatedReplacement()
public String getDeprecatedSince()
protected final void setSetterMethod(Method setter)
protected final Method getSetterMethod()
protected final void setGetterMethod(Method getter)
protected final Method getGetterMethod()
Copyright © 2016 The Apache Software Foundation. All rights reserved.