Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.common.config
Class ChoiceFactory

    java.lang.Object
      org.crosswire.common.config.ChoiceFactory

    public final class ChoiceFactory

extends Object

Factory for the well known Choices.

Author:
  Joe Walker
See Also:
  `The GNU Lesser General Public License for details.`

Field Summary
`private static Map<String,Object>` | `datamap` Storage of various registered objects
`private static Map<String,Class<Choice>>` | `map` Store of the known ChoiceTypes

Constructor Summary
`private` | `ChoiceFactory()` Prevent instantiation

Method Summary
`static Choice` | `getChoice(org.jdom2.Element option, ResourceBundle configResources)` Get a ChoiceFactory by element.
`static Map<String,Object>` | `getDataMap()` Method getDataMap.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### datamap

    private static Map<String,Object> datamap

  Storage of various registered objects

### map

    private static Map<String,Class<Choice>> map

  Store of the known ChoiceTypes

Constructor Detail

### ChoiceFactory

    private ChoiceFactory()

  Prevent instantiation

Method Detail

### getChoice

    public static Choice getChoice(org.jdom2.Element option,
                                   ResourceBundle configResources)
                            throws ClassNotFoundException,
                                   IllegalAccessException,
                                   InstantiationException,
                                   StartupException

  Get a ChoiceFactory by element.

  Parameters:
    `option` - The element to check
    `configResources` - the resource bundle holding the option
  Returns:
    One of the ChoiceTypes.
  Throws:
    `InstantiationException` - if this `data` represents an abstract class, an interface, an array class, a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reason.
    `ClassNotFoundException` - if the class is not found
    `IllegalAccessException` - if the class or its nullary constructor is not accessible.
    `StartupException` - if startup is not possible

### getDataMap

    public static Map<String,Object> getDataMap()

  Method getDataMap.

  Returns:
    the map data

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2015
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD