org.databene.commons.bean
Class BeanToPropertyArrayConverter<E>

java.lang.Object
  extended by org.databene.commons.converter.AbstractConverter<S,T>
      extended by org.databene.commons.converter.ThreadSafeConverter<E,java.lang.Object[]>
          extended by org.databene.commons.bean.BeanToPropertyArrayConverter<E>
All Implemented Interfaces:
java.lang.Cloneable, Converter<E,java.lang.Object[]>, ThreadAware

public class BeanToPropertyArrayConverter<E>
extends ThreadSafeConverter<E,java.lang.Object[]>

Converter implementation that extracts all property values of a JavaBean to a Properties object.

Created: 07.06.2007 14:11:58

Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.commons.converter.AbstractConverter
sourceType, targetType
 
Constructor Summary
BeanToPropertyArrayConverter(java.lang.Class<E> beanClass, java.lang.String... propertyNames)
           
BeanToPropertyArrayConverter(java.lang.String... propertyNames)
           
 
Method Summary
 java.lang.Object[] convert(E bean)
          Concerts an object of type S to an object of type T
 
Methods inherited from class org.databene.commons.converter.ThreadSafeConverter
clone, isParallelizable, isThreadSafe
 
Methods inherited from class org.databene.commons.converter.AbstractConverter
getSourceType, getTargetType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanToPropertyArrayConverter

public BeanToPropertyArrayConverter(java.lang.String... propertyNames)

BeanToPropertyArrayConverter

public BeanToPropertyArrayConverter(java.lang.Class<E> beanClass,
                                    java.lang.String... propertyNames)
Method Detail

convert

public java.lang.Object[] convert(E bean)
                           throws ConversionException
Description copied from interface: Converter
Concerts an object of type S to an object of type T

Parameters:
bean - the object to convert
Returns:
the converted object
Throws:
ConversionException - if the conversion fails


Copyright © 2010. All Rights Reserved.