Package moa.options
Class ClassOptionWithNames
- java.lang.Object
-
- com.github.javacliparser.AbstractOption
-
- moa.options.AbstractClassOption
-
- moa.options.ClassOptionWithNames
-
- All Implemented Interfaces:
Option
,Serializable
public class ClassOptionWithNames extends AbstractClassOption
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class moa.options.AbstractClassOption
currentValue, defaultCLIString, FILE_PREFIX_STRING, INMEM_PREFIX_STRING, nullString, requiredType
-
Fields inherited from class com.github.javacliparser.AbstractOption
cliChar, illegalNameCharacters, name, purpose
-
-
Constructor Summary
Constructors Constructor Description ClassOptionWithNames(String name, char cliChar, String purpose, Class<?> requiredType, String defaultCLIString, String[] classNames)
ClassOptionWithNames(String name, char cliChar, String purpose, Class<?> requiredType, String defaultCLIString, String nullString, String[] classNames)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Object
cliStringToObject(String cliString, Class<?> requiredType, Option[] externalOptions)
String[]
getClassNames()
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 moa.options.AbstractClassOption
classToCLIString, getDefaultCLIString, getNullString, getPreMaterializedObject, getRequiredType, 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
-
cliStringToObject
public static Object cliStringToObject(String cliString, Class<?> requiredType, Option[] externalOptions) throws Exception
- Throws:
Exception
-
getClassNames
public String[] getClassNames()
-
-