|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.jstacs.io.ParameterSetParser
public class ParameterSetParser
Class that extracts values from Parameters und creates instances of InstantiableFromParameterSets
from a ParameterSet.
| Nested Class Summary | |
|---|---|
static class |
ParameterSetParser.NotInstantiableException
An Exception that is thrown if an instance of some class could not be created. |
static class |
ParameterSetParser.WrongParameterTypeException
An that is thrown if the datatype of a |
| Constructor Summary | |
|---|---|
ParameterSetParser()
|
|
| Method Summary | |
|---|---|
static boolean |
getBooleanFromParameter(Parameter par)
Returns the boolean which is the value of the Parameter par. |
static byte |
getByteFromParameter(Parameter par)
Returns the byte which is the value of the Parameter par. |
static double |
getDoubleFromParameter(Parameter par)
Returns the double which is the value of the Parameter par. |
static float |
getFloatFromParameter(Parameter par)
Returns the float which is the value of the Parameter par. |
static InstantiableFromParameterSet |
getInstanceFromParameterSet(ParameterSet pars)
Returns an instance of a subclass of InstantiableFromParameterSet that can be instantiated by
the ParameterSet pars. |
static InstantiableFromParameterSet |
getInstanceFromParameterSet(ParameterSet pars,
Class instanceClass)
Returns an instance of a subclass of InstantiableFromParameterSet that can be instantiated by
the ParameterSet pars. |
static int |
getIntFromParameter(Parameter par)
Returns the int which is the value of the Parameter par. |
static long |
getLongFromParameter(Parameter par)
Returns the long which is the value of the Parameter par. |
static short |
getShortFromParameter(Parameter par)
Returns the short which is the value of the Parameter par. |
static String |
getStringFromParameter(Parameter par)
Returns the String which is the value of the Parameter par. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ParameterSetParser()
| Method Detail |
|---|
public static int getIntFromParameter(Parameter par)
throws ParameterSetParser.WrongParameterTypeException
int which is the value of the Parameter par.
par - the Parameter
int value
ParameterSetParser.WrongParameterTypeException - is thrown if par is not an int-Parameter,
i.e. its datatype is not Parameter.INT
public static float getFloatFromParameter(Parameter par)
throws ParameterSetParser.WrongParameterTypeException
float which is the value of the Parameter par.
par - the Parameter
float value
ParameterSetParser.WrongParameterTypeException - is thrown if par is not an float-Parameter,
i.e. its datatype is not Parameter.FLOAT
public static double getDoubleFromParameter(Parameter par)
throws ParameterSetParser.WrongParameterTypeException
double which is the value of the Parameter par.
par - the Parameter
double value
ParameterSetParser.WrongParameterTypeException - is thrown if par is not an double-Parameter,
i.e. its datatype is not Parameter.DOUBLE
public static short getShortFromParameter(Parameter par)
throws ParameterSetParser.WrongParameterTypeException
short which is the value of the Parameter par.
par - the Parameter
short value
ParameterSetParser.WrongParameterTypeException - is thrown if par is not an short-Parameter,
i.e. its datatype is not Parameter.SHORT
public static long getLongFromParameter(Parameter par)
throws ParameterSetParser.WrongParameterTypeException
long which is the value of the Parameter par.
par - the Parameter
long value
ParameterSetParser.WrongParameterTypeException - is thrown if par is not an long-Parameter,
i.e. its datatype is not Parameter.LONG
public static byte getByteFromParameter(Parameter par)
throws ParameterSetParser.WrongParameterTypeException
byte which is the value of the Parameter par.
par - the Parameter
byte value
ParameterSetParser.WrongParameterTypeException - is thrown if par is not an byte-Parameter,
i.e. its datatype is not Parameter.BYTE
public static boolean getBooleanFromParameter(Parameter par)
throws ParameterSetParser.WrongParameterTypeException
boolean which is the value of the Parameter par.
par - the Parameter
boolean value
ParameterSetParser.WrongParameterTypeException - is thrown if par is not an boolean-Parameter,
i.e. its datatype is not Parameter.BOOLEAN
public static String getStringFromParameter(Parameter par)
throws ParameterSetParser.WrongParameterTypeException
String which is the value of the Parameter par.
par - the Parameter
String value
ParameterSetParser.WrongParameterTypeException - is thrown if par is not an String-Parameter,
i.e. its datatype is not Parameter.STRING
public static InstantiableFromParameterSet getInstanceFromParameterSet(ParameterSet pars)
throws ParameterSetParser.NotInstantiableException
InstantiableFromParameterSet that can be instantiated by
the ParameterSet pars. The instance-class is taken from pars via the getInstanceClass()-method.
pars - the ParameterSet
ParameterSetParser.NotInstantiableException - thrown if getInstanceClass() of pars is null,
could not be found or cannot be instantiated from pars
public static InstantiableFromParameterSet getInstanceFromParameterSet(ParameterSet pars,
Class instanceClass)
throws ParameterSetParser.NotInstantiableException
InstantiableFromParameterSet that can be instantiated by
the ParameterSet pars. The instance-class is taken from instanceClass.
pars - the ParameterSetinstanceClass - the class that shall be instantiated
ParameterSetParser.NotInstantiableException - thrown if instanceClass
could not be found or cannot be instantiated from pars
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||