|
||||||||||
| 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.
The GNU Lesser General Public License for details.| 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 AbstractReflectedChoiceoption - the optionconfigResources - the resource bundle to load
StartupException - if startup is not possiblepublic 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 AbstractReflectedChoiceorig - the object to be converted to a string
public Object convertToObject(String orig)
AbstractReflectedChoice
convertToObject in class AbstractReflectedChoiceorig - the marshaled representation of the object
|
Copyright ยจ 2003-2015 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||