|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crosswire.common.config.AbstractReflectedChoice
org.crosswire.common.config.MappedOptionsChoice
public class MappedOptionsChoice
A class to convert between strings and objects of a type.
for license details.
The copyright to this program is held by it's authors.| Field Summary | |
|---|---|
private static org.slf4j.Logger |
log
The log stream |
private Map<?,?> |
options
|
| Constructor Summary | |
|---|---|
MappedOptionsChoice()
|
|
| Method Summary | |
|---|---|
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) |
| Methods inherited from class org.crosswire.common.config.AbstractReflectedChoice |
|---|
getFullPath, getHelpText, getKey, getString, getType, isHidden, isIgnored, isSaveable, requiresRestart, setFullPath, setHelpText, setString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.crosswire.common.config.Choice |
|---|
getFullPath, getHelpText, getKey, getString, getType, isHidden, isIgnored, isSaveable, requiresRestart, setFullPath, setHelpText, setString |
| Field Detail |
|---|
private Map<?,?> options
private static org.slf4j.Logger log
| Constructor Detail |
|---|
public MappedOptionsChoice()
| Method Detail |
|---|
public void init(org.jdom2.Element option,
ResourceBundle configResources)
throws StartupException
Choice
init in interface Choiceinit in class AbstractReflectedChoiceStartupExceptionpublic Map<Object,Object> getOptions()
MappedChoice
getOptions in interface MappedChoice<Object,Object>public Class<String> getConversionClass()
Choice
getConversionClass in interface Choicepublic String convertToString(Object orig)
AbstractReflectedChoice
convertToString in class AbstractReflectedChoicepublic Object convertToObject(String orig)
AbstractReflectedChoice
convertToObject in class AbstractReflectedChoice
|
Copyright ? 2003-2011 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||