org.shept.util
public class BeanUtilsExtended extends org.springframework.beans.BeanUtils
| Constructor and Description |
|---|
BeanUtilsExtended() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
copyProperties, copyProperties, copyProperties, findDeclaredMethod, findDeclaredMethodWithMinimalParameters, findEditorByConvention, findMethod, findMethodWithMinimalParameters, findMethodWithMinimalParameters, findPropertyForMethod, findPropertyType, getPropertyDescriptor, getPropertyDescriptors, getWriteMethodParameter, instantiate, instantiateClass, instantiateClass, isSimpleProperty, isSimpleValueType, resolveSignaturepublic 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 beanorg.springframework.beans.BeansException - if the copying failedBeanWrapperpublic 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 toorg.springframework.beans.BeansException - if the copying failedBeanWrapperprivate 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 ignoreorg.springframework.beans.BeansException - if the copying failedBeanWrapperpublic static Map<String,?> findNestedPaths(Object targetObject, Class<?> targetClass) throws Exception
Exceptionpublic static Map<String,?> findNestedPaths(Object targetObject, Class<?> targetClass, List<String> ignoreList) throws Exception
Exceptionpublic static Map<String,?> findNestedPaths(Object targetObject, Class<?> targetClass, String nestedPath, List<String> ignoreList, Set<Object> visited, int maxDepth) throws Exception
- targetObject - targetClass - nestedPath - Exceptionprivate static boolean isInstanceVisited(Collection coll, Object value) throws Exception
ExceptionCopyright © 2014. All Rights Reserved.