Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* The MIT License
*
* Copyright (C) 2015 Asterios Raptis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package de.alpharogroup.diff.object;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.beanutils.BeanUtils;
import de.alpharogroup.check.Check;
import de.alpharogroup.compare.object.CompareObjectExtensions;
import de.alpharogroup.diff.beans.ChangedAttributeResult;
import lombok.experimental.UtilityClass;
/**
* The class {@link DiffObjectExtensions} can find changed data from objects in other words the
* difference of them.
*/
@UtilityClass
public class DiffObjectExtensions
{
/**
* Compares the given two objects and gets the changed data.
*
* @param sourceOjbect
* the source ojbect
* @param objectToCompare
* the object to compare
* @return the changed data
* @throws IllegalAccessException
* Thrown if this method or object is enforcing java language access control and the
* underlying method or object is inaccessible.
* @throws InvocationTargetException
* Thrown if the property accessor method throws an exception
* @throws NoSuchMethodException
* Thrown if this {@code Method} object is enforcing Java language access control
* and the underlying method is inaccessible.
*/
@SuppressWarnings("rawtypes")
public static Map