public class CodeHelper extends Object
| Constructor and Description |
|---|
CodeHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Class |
classFromCommand(String cmd)
Extracts the class from the command.
|
static String |
classnameFromCommand(String cmd)
Extracts the classname from the command.
|
static boolean |
isOptionHandler(String cmd)
Returns the whether class in the commandline implements
OptionHandler. |
static String[] |
optionsFromCommand(String cmd)
Extracts the options from the command.
|
static String |
optionsStringFromCommand(String cmd)
Extracts the options from the command as single string.
|
public static String classnameFromCommand(String cmd) throws Exception
cmd - the command to useException - if failed to split commandpublic static String[] optionsFromCommand(String cmd) throws Exception
cmd - the command to useException - if failed to split commandpublic static String optionsStringFromCommand(String cmd) throws Exception
cmd - the command to useException - if failed to split commandpublic static Class classFromCommand(String cmd) throws Exception
cmd - the command to useException - if failed to instantiate class or failed to split commandCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.