Package org.beanio.internal.util
Class BeanUtil
- java.lang.Object
-
- org.beanio.internal.util.BeanUtil
-
public class BeanUtil extends java.lang.Object
Utility class for instantiating configurable bean classes.- Since:
- 1.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
configure(java.lang.Object bean, java.util.Properties props)
Sets properties on a bean object using default type handlers.static java.lang.Object
createBean(java.lang.ClassLoader classLoader, java.lang.String className)
Instantiates a bean class using its class name.static java.lang.Object
createBean(java.lang.ClassLoader classLoader, java.lang.String className, java.util.Properties props)
Instantiates a bean class.
-
-
-
Method Detail
-
createBean
public static java.lang.Object createBean(java.lang.ClassLoader classLoader, java.lang.String className, java.util.Properties props)
Instantiates a bean class.- Parameters:
classLoader
- theClassLoader
to use to resolveclassName
className
- the fully qualified name of the bean class to createprops
- the bean properties to set on the instantiated object- Returns:
- the created bean object
-
createBean
public static java.lang.Object createBean(java.lang.ClassLoader classLoader, java.lang.String className)
Instantiates a bean class using its class name.- Parameters:
className
- the fully qualified name of the class to instantiate- Returns:
- the created bean object
-
configure
public static void configure(java.lang.Object bean, java.util.Properties props)
Sets properties on a bean object using default type handlers.- Parameters:
bean
- the object to set the properties onprops
- the bean properties to set on the object
-
-