T1
- bean 1 typeT2
- bean 2 typepublic class BeanConverter<T1,T2> extends Object
Given any two beans and a map that establishes which properties in bean 1 correspond to properties in bean 2, this class can be used to automatically obtain bean 1 from an instance of bean 2 and vice-versa.
Constructor and Description |
---|
BeanConverter(Class<T1> clazz1,
Class<T2> clazz2,
Map<String,String> propertyBindingMap) |
Modifier and Type | Method and Description |
---|---|
T1 |
getBean1(T2 bean2)
Get bean 1 from an instance of bean 2
|
T2 |
getBean2(T1 bean1)
Get bean 2 from an instance of bean 1
|
Copyright © 2011–2020 Juffrou. All rights reserved.