org.rblasch.convert.converters
Class ChainedConverter

java.lang.Object
  extended byorg.rblasch.convert.converters.AbstractConverter
      extended byorg.rblasch.convert.converters.ChainedConverter
All Implemented Interfaces:
Converter, MetaConverter

public final class ChainedConverter
extends AbstractConverter


Constructor Summary
ChainedConverter(java.util.List converters)
          Initialize this chained converter.
 
Method Summary
 java.lang.Object convert(java.lang.Object obj)
          Converts the given value to the destination types.
 Type getDestinationType()
           
 Type getSourceType()
           
 int getWeight()
           
 
Methods inherited from class org.rblasch.convert.converters.AbstractConverter
equals, getConverter, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChainedConverter

public ChainedConverter(java.util.List converters)
Initialize this chained converter.

Parameters:
converters -
Method Detail

getSourceType

public Type getSourceType()

getDestinationType

public Type getDestinationType()

getWeight

public int getWeight()

convert

public java.lang.Object convert(java.lang.Object obj)
                         throws java.lang.Exception
Converts the given value to the destination types.

Parameters:
obj - Object of types getSourceType(), or null
Returns:
null iff value is null, object of types getDestinationType()
Throws:
org.apache.commons.convert.NoSuchConversionException - Given object not of types getSourceType()
org.apache.commons.convert.ConversionFailedException - Conversion failed; see exception message and cause for details
java.lang.Exception - Conversion failed for some reason


Copyright © 2004 Ronald Blaschke. All Rights Reserved.