org.databene.commons.converter
Class PropertyExtractor<B,P>
java.lang.Object
org.databene.commons.converter.AbstractConverter<S,T>
org.databene.commons.converter.ThreadSafeConverter<B,P>
org.databene.commons.converter.PropertyExtractor<B,P>
- All Implemented Interfaces:
- java.lang.Cloneable, Converter<B,P>, ThreadAware
public class PropertyExtractor<B,P>
- extends ThreadSafeConverter<B,P>
Converter implementation that reads a property form a JavaBean.
Created at 15.07.2009 23:19:18
- Since:
- 0.5.0
- Author:
- Volker Bergmann
|
Constructor Summary |
PropertyExtractor(java.lang.Class<B> beanType,
java.lang.String propertyName,
java.lang.Class<P> targetType)
|
|
Method Summary |
P |
convert(B 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 |
PropertyExtractor
public PropertyExtractor(java.lang.Class<B> beanType,
java.lang.String propertyName,
java.lang.Class<P> targetType)
convert
public P convert(B 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.