org.apache.commons.convert
Class MiscConverters.StringToEnumConverterCreator

java.lang.Object
  extended by org.apache.commons.convert.MiscConverters.StringToEnumConverterCreator
All Implemented Interfaces:
ConverterCreator, ConverterLoader
Enclosing class:
MiscConverters

public static class MiscConverters.StringToEnumConverterCreator
extends Object
implements ConverterCreator, ConverterLoader


Constructor Summary
MiscConverters.StringToEnumConverterCreator()
           
 
Method Summary
<S,T> Converter<S,T>
createConverter(Class<S> sourceClass, Class<T> targetClass)
          Creates a Converter that can convert the sourceClass to the targetClass.
 void loadConverters()
          Create and register converters with the Java object type conversion framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiscConverters.StringToEnumConverterCreator

public MiscConverters.StringToEnumConverterCreator()
Method Detail

createConverter

public <S,T> Converter<S,T> createConverter(Class<S> sourceClass,
                                            Class<T> targetClass)
Description copied from interface: ConverterCreator
Creates a Converter that can convert the sourceClass to the targetClass. Returns null if this creator doesn't support the class pair.

Specified by:
createConverter in interface ConverterCreator
Parameters:
sourceClass - The source Class to convert from
targetClass - The target Class to convert to
Returns:
A Converter that can convert sourceClass to targetClass

loadConverters

public void loadConverters()
Description copied from interface: ConverterLoader
Create and register converters with the Java object type conversion framework. If the converter extends one of the converter abstract classes, then the converter will register itself when an instance is created. Otherwise, call Converters.registerConverter(Converter) with the Converter instance.

Specified by:
loadConverters in interface ConverterLoader


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.