Package com.github.javacliparser
Class ClassOption
- java.lang.Object
-
- com.github.javacliparser.AbstractOption
-
- com.github.javacliparser.AbstractClassOption
-
- com.github.javacliparser.ClassOption
-
- All Implemented Interfaces:
Option
,Serializable
public class ClassOption extends AbstractClassOption
Class option.- Version:
- $Revision: 7 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.github.javacliparser.AbstractClassOption
currentValue, defaultCLIString, FILE_PREFIX_STRING, INMEM_PREFIX_STRING, nullString, requiredType
-
Fields inherited from class com.github.javacliparser.AbstractOption
cliChar, illegalNameCharacters, name, purpose
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Object
cliStringToObject(String cliString, Class<?> requiredType, Option[] externalOptions)
static Object
createObject(String[] args, Class<?> requiredType)
static Object
createObject(String cliString, Class<?> requiredType)
String
getValueAsCLIString()
Gets the value of a Command Line Interface text as a stringstatic String
objectToCLIString(Object obj, Class<?> requiredType)
void
setValueViaCLIString(String s)
Sets value of this option via the Command Line Interface text-
Methods inherited from class com.github.javacliparser.AbstractClassOption
classToCLIString, getDefaultCLIString, getNullString, getRequiredType, getValue, materializeObject, setCurrentObject, stripPackagePrefix
-
Methods inherited from class com.github.javacliparser.AbstractOption
copy, getCLIChar, getName, getPurpose, getStateString, nameIsLegal, resetToDefault
-
-
-
-
Method Detail
-
getValueAsCLIString
public String getValueAsCLIString()
Description copied from interface:Option
Gets the value of a Command Line Interface text as a string- Specified by:
getValueAsCLIString
in interfaceOption
- Specified by:
getValueAsCLIString
in classAbstractClassOption
- Returns:
- the string with the value of the Command Line Interface text
-
setValueViaCLIString
public void setValueViaCLIString(String s)
Description copied from interface:Option
Sets value of this option via the Command Line Interface text- Specified by:
setValueViaCLIString
in interfaceOption
- Specified by:
setValueViaCLIString
in classAbstractClassOption
- Parameters:
s
- the Command Line Interface text
-
createObject
public static Object createObject(String cliString, Class<?> requiredType) throws Exception
- Throws:
Exception
-
createObject
public static Object createObject(String[] args, Class<?> requiredType) throws Exception
- Throws:
Exception
-
-