br.com.caelum.iogi.conversion
Class FallbackConverter<T>
java.lang.Object
br.com.caelum.iogi.conversion.TypeConverter<T>
br.com.caelum.iogi.conversion.FallbackConverter<T>
- All Implemented Interfaces:
- Instantiator<T>
public class FallbackConverter<T>
- extends TypeConverter<T>
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FallbackConverter
public FallbackConverter(TypeConverter<T> delegate,
T fallbackValue)
fallbackToNull
public static <T> FallbackConverter<T> fallbackToNull(TypeConverter<T> delegate)
fallbackTo
public static <T> FallbackConverter<T> fallbackTo(TypeConverter<T> delegate,
T fallbackValue)
convert
protected T convert(String stringValue,
Target<?> to)
throws Exception
- Specified by:
convert in class TypeConverter<T>
- Throws:
Exception
isAbleToInstantiate
public boolean isAbleToInstantiate(Target<?> target)
Copyright © 2014. All Rights Reserved.