public class MappedOptionsChoice extends AbstractReflectedChoice implements MappedChoice<Object,Object>
The GNU Lesser General Public License for details.
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
log
The log stream
|
private Map<?,?> |
options |
Constructor and Description |
---|
MappedOptionsChoice() |
Modifier and Type | Method and Description |
---|---|
Object |
convertToObject(String orig)
Convert from a stored string to an object to use with reflection
|
String |
convertToString(Object orig)
Convert from a reflection return value to a String for storage
|
Class<String> |
getConversionClass()
The class that this Choice works on.
|
Map<Object,Object> |
getOptions()
The available alternative values to be presented as options to the user
where the user interface allows presentation of alternatives.
|
void |
init(org.jdom2.Element option,
ResourceBundle configResources)
String value to associate with the name (key)
|
getFullPath, getHelpText, getKey, getString, getType, isHidden, isIgnored, isSaveable, requiresRestart, setFullPath, setHelpText, setString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFullPath, getHelpText, getKey, getString, getType, isHidden, isIgnored, isSaveable, requiresRestart, setFullPath, setHelpText, setString
private Map<?,?> options
private static org.slf4j.Logger log
public void init(org.jdom2.Element option, ResourceBundle configResources) throws StartupException
Choice
init
in interface Choice
init
in class AbstractReflectedChoice
option
- the optionconfigResources
- the resource bundle to loadStartupException
- if startup is not possiblepublic Map<Object,Object> getOptions()
MappedChoice
getOptions
in interface MappedChoice<Object,Object>
public Class<String> getConversionClass()
Choice
getConversionClass
in interface Choice
public String convertToString(Object orig)
AbstractReflectedChoice
convertToString
in class AbstractReflectedChoice
orig
- the object to be converted to a stringpublic Object convertToObject(String orig)
AbstractReflectedChoice
convertToObject
in class AbstractReflectedChoice
orig
- the marshaled representation of the object