T - the type of the option.public abstract class AbstractOptionCheck<T extends Enum<T>> extends Check
Enum. The logic to convert from a string
representation to the Enum is to String.trim() the string
and convert using String.toUpperCase() and then look up using
Enum.valueOf(java.lang.Class<T>, java.lang.String).| Constructor and Description |
|---|
AbstractOptionCheck(T literalDefault,
Class<T> optionClass)
Creates a new
AbstractOptionCheck instance. |
| Modifier and Type | Method and Description |
|---|---|
T |
getAbstractOption() |
void |
setOption(String optionStr)
Set the option to enforce.
|
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLine, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitTokengetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic AbstractOptionCheck(T literalDefault, Class<T> optionClass)
AbstractOptionCheck instance.literalDefault - the default option.optionClass - the class for the option. Required due to a quirk
in the Java language.public void setOption(String optionStr) throws org.apache.commons.beanutils.ConversionException
optionStr - string to decode option fromorg.apache.commons.beanutils.ConversionException - if unable to decodepublic T getAbstractOption()
AbstractOption setCopyright © 2001–2015. All rights reserved.