// Path: Dumbledroid/Dumbledroid/src/main/java/io/leocad/dumbledroid/data/ReflectionHelper.java
// public class ReflectionHelper {
// 
// 
// 	public static Field getField(Class<?> fieldClass, String fieldName) throws NoSuchFieldException {
// 		final Field field = fieldClass.getDeclaredField(fieldName);
//         field.setAccessible(true);
//         return field;
// 	}
// 
// 	public static Field getFieldInHierarchy(Class<?> fieldClass, String fieldName) throws NoSuchFieldException {
// 		try {
// 			return getField(fieldClass, fieldName);
// 		} catch (NoSuchFieldException e) {
// 			final Class<?> superClass = fieldClass.getSuperclass();
// 			if(superClass == null) {
// 				throw e;
// 			}
// 			return getFieldInHierarchy(superClass, fieldName);
// 		}
// 	}
// 
// 	public static Field[] getAllFields(Class<?> fieldClass) {
// 		final Field[] fields = fieldClass.getDeclaredFields();
// 		for(final Field field : fields) {
// 			field.setAccessible(true);
// 		}
// 		return fields;
// 	}
// }


import io.leocad.dumbledroid.data.ReflectionHelper;
import java.lang.reflect.Field;
package io.leocad.dumbledroid.data.cache;



public class ObjectCopier {

	public static boolean copy(Object src, Object dest) {
		return copyAux(src, dest, src.getClass(), dest.getClass());
	}

	public static boolean copyAux(Object src, Object dest, Class<?> srcClass, Class<?> destClass) {
		if(srcClass != destClass) {
			return false;
		}

// Path: Dumbledroid/Dumbledroid/src/main/java/io/leocad/dumbledroid/data/ReflectionHelper.java
// public class ReflectionHelper {
// 
// 
// 	public static Field getField(Class<?> fieldClass, String fieldName) throws NoSuchFieldException {
// 		final Field field = fieldClass.getDeclaredField(fieldName);
//         field.setAccessible(true);
//         return field;
// 	}
// 
// 	public static Field getFieldInHierarchy(Class<?> fieldClass, String fieldName) throws NoSuchFieldException {
// 		try {
// 			return getField(fieldClass, fieldName);
// 		} catch (NoSuchFieldException e) {
// 			final Class<?> superClass = fieldClass.getSuperclass();
// 			if(superClass == null) {
// 				throw e;
// 			}
// 			return getFieldInHierarchy(superClass, fieldName);
// 		}
// 	}
// 
// 	public static Field[] getAllFields(Class<?> fieldClass) {
// 		final Field[] fields = fieldClass.getDeclaredFields();
// 		for(final Field field : fields) {
// 			field.setAccessible(true);
// 		}
// 		return fields;
// 	}
// }


// Path: Dumbledroid/Dumbledroid/src/main/java/io/leocad/dumbledroid/data/cache/ObjectCopier.java
import io.leocad.dumbledroid.data.ReflectionHelper;
import java.lang.reflect.Field;

package io.leocad.dumbledroid.data.cache;



public class ObjectCopier {

	public static boolean copy(Object src, Object dest) {
		return copyAux(src, dest, src.getClass(), dest.getClass());
	}

	public static boolean copyAux(Object src, Object dest, Class<?> srcClass, Class<?> destClass) {
		if(srcClass != destClass) {
			return false;
		}

		final Field[] srcFields = ReflectionHelper.getAllFields(srcClass);