// Path: src/main/java/com/statemachinesystems/envy/Assertions.java
// public static void assertArray(Class<?> c) {
//     if (! c.isArray()) {
//         throw new IllegalArgumentException(
//                 String.format("%s is not an array", c.getCanonicalName()));
//     }
// }


import java.lang.reflect.Array;
import java.util.HashMap;
import java.util.Map;
import static com.statemachinesystems.envy.Assertions.assertArray;

    private static void registerBoxedClassForPrimitive(Class<?> primitive, Class<?> boxed) {
        primitiveToBoxed.put(primitive, boxed);
        boxedToPrimitive.put(boxed, primitive);
    }

    public static Class<?> toBoxed(Class<?> c) {
        return c.isPrimitive()
                ? primitiveToBoxed.get(c)
                : c;
    }

    public static Class<?> toPrimitive(Class<?> c) {
        if (c.isPrimitive()) {
            return c;
        }
        Class<?> primitive = boxedToPrimitive.get(c);
        if (primitive == null) {
            throw new IllegalArgumentException(
                    String.format("%s is not a wrapper class", c.getSimpleName()));
        }
        return primitive;
    }

    public static boolean isPrimitiveArray(Class<?> c) {
        return c.isArray() && c.getComponentType().isPrimitive();
    }

    @SuppressWarnings("unchecked")
    public static <T> T boxedArrayToPrimitiveArray(Object src) {
// Path: src/main/java/com/statemachinesystems/envy/Assertions.java
// public static void assertArray(Class<?> c) {
//     if (! c.isArray()) {
//         throw new IllegalArgumentException(
//                 String.format("%s is not an array", c.getCanonicalName()));
//     }
// }


// Path: src/main/java/com/statemachinesystems/envy/Conversions.java
import java.lang.reflect.Array;
import java.util.HashMap;
import java.util.Map;
import static com.statemachinesystems.envy.Assertions.assertArray;


    private static void registerBoxedClassForPrimitive(Class<?> primitive, Class<?> boxed) {
        primitiveToBoxed.put(primitive, boxed);
        boxedToPrimitive.put(boxed, primitive);
    }

    public static Class<?> toBoxed(Class<?> c) {
        return c.isPrimitive()
                ? primitiveToBoxed.get(c)
                : c;
    }

    public static Class<?> toPrimitive(Class<?> c) {
        if (c.isPrimitive()) {
            return c;
        }
        Class<?> primitive = boxedToPrimitive.get(c);
        if (primitive == null) {
            throw new IllegalArgumentException(
                    String.format("%s is not a wrapper class", c.getSimpleName()));
        }
        return primitive;
    }

    public static boolean isPrimitiveArray(Class<?> c) {
        return c.isArray() && c.getComponentType().isPrimitive();
    }

    @SuppressWarnings("unchecked")
    public static <T> T boxedArrayToPrimitiveArray(Object src) {
        assertArray(src.getClass());