org.databene.commons.converter
Class SourceClassMethodInvoker<S,T>
java.lang.Object
org.databene.commons.converter.AbstractConverter<S,T>
org.databene.commons.converter.ThreadSafeConverter<S,T>
org.databene.commons.converter.SourceClassMethodInvoker<S,T>
- All Implemented Interfaces:
- java.lang.Cloneable, Converter<S,T>, ThreadAware
public class SourceClassMethodInvoker<S,T>
- extends ThreadSafeConverter<S,T>
Converter implementation which invokes a no-arg method on the source object.
Created: 27.02.2010 06:53:27
- Since:
- 0.5.0
- Author:
- Volker Bergmann
|
Constructor Summary |
protected |
SourceClassMethodInvoker(java.lang.Class<S> sourceType,
java.lang.Class<T> targetType,
java.lang.reflect.Method method)
|
|
Method Summary |
T |
convert(S sourceValue)
Concerts an object of type S to an object of type T |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SourceClassMethodInvoker
protected SourceClassMethodInvoker(java.lang.Class<S> sourceType,
java.lang.Class<T> targetType,
java.lang.reflect.Method method)
convert
public T convert(S sourceValue)
throws ConversionException
- Description copied from interface:
Converter
- Concerts an object of type S to an object of type T
- Parameters:
sourceValue - the object to convert
- Returns:
- the converted object
- Throws:
ConversionException - if the conversion fails
Copyright © 2010. All Rights Reserved.