org.crosswire.common.config
Class StringArrayChoice

java.lang.Object
  extended by org.crosswire.common.config.AbstractReflectedChoice
      extended by org.crosswire.common.config.StringArrayChoice
All Implemented Interfaces:
Choice

public class StringArrayChoice
extends AbstractReflectedChoice

A class to convert between strings and objects of a type.

Author:
Joe Walker [joe at eireneh dot com]
See Also:
for license details. The copyright to this program is held by it's authors.

Field Summary
private  String separator
           
 
Fields inherited from interface org.crosswire.common.config.Choice
PRIORITY_ACCESSOR, PRIORITY_CTOR, PRIORITY_EXTENDER, PRIORITY_HIGHEST, PRIORITY_LOWEST, PRIORITY_NORMAL, PRIORITY_SYSTEM
 
Constructor Summary
StringArrayChoice()
           
 
Method Summary
 Object convertToObject(String orig)
          Convert from a stored string to an object to use with relfection
 String convertToString(Object orig)
          Convert from a reflection return value to a String for storage
 Class getConvertionClass()
          The class that this Choice works on.
 void init(org.jdom.Element option, ResourceBundle configResources)
          String value to associate with the name (key)
 
Methods inherited from class org.crosswire.common.config.AbstractReflectedChoice
getFullPath, getHelpText, getPriority, getString, getType, isSaveable, requiresRestart, setFullPath, setHelpText, setPriority, setString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

separator

private String separator
Constructor Detail

StringArrayChoice

public StringArrayChoice()
Method Detail

init

public void init(org.jdom.Element option,
                 ResourceBundle configResources)
          throws StartupException
Description copied from interface: Choice
String value to associate with the name (key)

Specified by:
init in interface Choice
Overrides:
init in class AbstractReflectedChoice
Throws:
StartupException

getConvertionClass

public Class getConvertionClass()
Description copied from interface: Choice
The class that this Choice works on. Used to decide how to display the choice to the user.

Returns:
The Class that this Choice works using.

convertToString

public String convertToString(Object orig)
Description copied from class: AbstractReflectedChoice
Convert from a reflection return value to a String for storage

Specified by:
convertToString in class AbstractReflectedChoice

convertToObject

public Object convertToObject(String orig)
Description copied from class: AbstractReflectedChoice
Convert from a stored string to an object to use with relfection

Specified by:
convertToObject in class AbstractReflectedChoice

Copyright ยจ 2003-2005