|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.beans.BeanUtils
org.shept.util.BeanUtilsExtended
public class BeanUtilsExtended
| Constructor Summary | |
|---|---|
BeanUtilsExtended()
|
|
| Method Summary | |
|---|---|
static Map<String,?> |
findNestedPaths(Object targetObject,
Class<?> targetClass)
|
static Map<String,?> |
findNestedPaths(Object targetObject,
Class<?> targetClass,
List<String> ignoreList)
|
static Map<String,?> |
findNestedPaths(Object targetObject,
Class<?> targetClass,
String nestedPath,
List<String> ignoreList,
Set<Object> visited,
int maxDepth)
Find all occurrences of targetClass in targetObject. |
private static boolean |
isInstanceVisited(Collection coll,
Object value)
|
static void |
mergeProperties(Object source,
Object target)
Merge the property values of the given source bean into the target bean. |
static void |
mergeProperties(Object source,
Object target,
Class<?> editable)
Merge the property values of the given source bean into the given target bean, only setting properties defined in the given "editable" class (or interface). |
private static void |
mergeProperties(Object source,
Object target,
Class<?> editable,
String[] ignoreProperties)
Merge the property values of the given source bean into the given target bean. |
| Methods inherited from class org.springframework.beans.BeanUtils |
|---|
copyProperties, copyProperties, copyProperties, findDeclaredMethod, findDeclaredMethodWithMinimalParameters, findEditorByConvention, findMethod, findMethodWithMinimalParameters, findMethodWithMinimalParameters, findPropertyForMethod, findPropertyType, getPropertyDescriptor, getPropertyDescriptors, getWriteMethodParameter, instantiate, instantiateClass, instantiateClass, isSimpleProperty, isSimpleValueType, resolveSignature |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanUtilsExtended()
| Method Detail |
|---|
public static void mergeProperties(Object source,
Object target)
throws org.springframework.beans.BeansException
Note: Only not-null values are merged into the given target bean. Note: The source and target classes do not have to match or even be derived from each other, as long as the properties match. Any bean properties that the source bean exposes but the target bean does not will silently be ignored.
This is just a convenience method. For more complex transfer needs, consider using a full BeanWrapper.
source - the source beantarget - the target bean
org.springframework.beans.BeansException - if the copying failedBeanWrapper
public static void mergeProperties(Object source,
Object target,
Class<?> editable)
throws org.springframework.beans.BeansException
Note: Only not-null values are merged into the given target bean. Note: The source and target classes do not have to match or even be derived from each other, as long as the properties match. Any bean properties that the source bean exposes but the target bean does not will silently be ignored.
This is just a convenience method. For more complex transfer needs, consider using a full BeanWrapper.
source - the source beantarget - the target beaneditable - the class (or interface) to restrict property setting to
org.springframework.beans.BeansException - if the copying failedBeanWrapper
private static void mergeProperties(Object source,
Object target,
Class<?> editable,
String[] ignoreProperties)
throws org.springframework.beans.BeansException
Note: Only not-null values are merged into the given target bean. Note: The source and target classes do not have to match or even be derived from each other, as long as the properties match. Any bean properties that the source bean exposes but the target bean does not will silently be ignored.
source - the source beantarget - the target beaneditable - the class (or interface) to restrict property setting toignoreProperties - array of property names to ignore
org.springframework.beans.BeansException - if the copying failedBeanWrapper
public static Map<String,?> findNestedPaths(Object targetObject,
Class<?> targetClass)
throws Exception
Exception
public static Map<String,?> findNestedPaths(Object targetObject,
Class<?> targetClass,
List<String> ignoreList)
throws Exception
Exception
public static Map<String,?> findNestedPaths(Object targetObject,
Class<?> targetClass,
String nestedPath,
List<String> ignoreList,
Set<Object> visited,
int maxDepth)
throws Exception
- targetObject - targetClass - nestedPath -
Exception
private static boolean isInstanceVisited(Collection coll,
Object value)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||