public class DiffObjectExtensions extends Object
DiffObjectExtensions can find changed data from objects in other words the
difference of them.| Constructor and Description |
|---|
DiffObjectExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static List<ChangedAttributeResult> |
getChangedData(Object sourceOjbect,
Object objectToCompare)
Gets the changed data in a list.
|
static Map<Object,ChangedAttributeResult> |
getChangedDataMap(Object sourceOjbect,
Object objectToCompare)
Compares the given two objects and gets the changed data.
|
static List<ChangedAttributeResult> |
getChangedDataWithReflection(Object sourceOjbect,
Object objectToCompare,
List<ChangedAttributeResult> changedData,
ChangedAttributeResult parent)
Gets the changed data recursively in a list from the given source object and the object to
compare.
|
public static Map<Object,ChangedAttributeResult> getChangedDataMap(Object sourceOjbect, Object objectToCompare) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
sourceOjbect - the source ojbectobjectToCompare - the object to compareIllegalAccessException - Thrown if this method or object is enforcing java language access control and the
underlying method or object is inaccessible.InvocationTargetException - Thrown if the property accessor method throws an exceptionNoSuchMethodException - Thrown if this Method object is enforcing Java language access control
and the underlying method is inaccessible.public static List<ChangedAttributeResult> getChangedData(Object sourceOjbect, Object objectToCompare) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException
sourceOjbect - the source ojbectobjectToCompare - the object to compareIllegalAccessException - Thrown if this method or object is enforcing java language access control and the
underlying method or object is inaccessible.InvocationTargetException - Thrown if the property accessor method throws an exceptionNoSuchMethodException - Thrown if this Method object is enforcing Java language access control
and the underlying method is inaccessible.public static List<ChangedAttributeResult> getChangedDataWithReflection(Object sourceOjbect, Object objectToCompare, List<ChangedAttributeResult> changedData, ChangedAttributeResult parent) throws IllegalArgumentException, IllegalAccessException
sourceOjbect - the source ojbectobjectToCompare - the object to comparechangedData - the changed data in a list. This can be initially null, the list will be than
created.parent - the parent of the changed data. This is initially null.IllegalArgumentException - Thrown if an illegal argument is givenIllegalAccessException - Thrown if this method or object is enforcing java language access control and the
underlying method or object is inaccessible.Copyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.