// Path: src/main/java/org/laborra/beantrace/VertexFieldAdder.java
// public interface VertexFieldAdder {
//     void addField(Vertex vertex, String fieldName, Object item);
// }
// 
// Path: src/main/java/org/laborra/beantrace/internal/ReflectUtils.java
// public class ReflectUtils {
// 
//     private static final Set<Class> PRIMITIVE_TYPES = Sets.newHashSet(
//             (Class) Integer.class, Long.class, String.class, Boolean.class, Byte.class,
//             Character.class, Float.class, Double.class, Short.class
//     );
// 
//     /**
//      * Returns true if the given type is intended to be "primitive" by the library
//      *
//      * @param type The class to check
//      * @return True if the give type is primitive, false otherwise
//      */
//     public static boolean isPrimitive(Class<?> type) {
//         return type.isPrimitive() || PRIMITIVE_TYPES.contains(type);
//     }
// 
//     public static List<Field> getFieldFromClassHierarchy(Class<?> clazz) {
//         if (Object.class.equals(clazz)) {
//             return Collections.emptyList();
//         }
//         final ArrayList<Field> fields = Lists.newArrayList(clazz.getDeclaredFields());
//         fields.addAll(getFieldFromClassHierarchy(clazz.getSuperclass()));
//         return fields;
//     }
// }
// 
// Path: src/main/java/org/laborra/beantrace/model/Edge.java
// public class Edge {
//     private String name;
//     private Vertex to;
// 
//     public Edge(String name, Vertex to) {
//         this.name = name;
//         this.to = to;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public Vertex getTo() {
//         return to;
//     }
// }
// 
// Path: src/main/java/org/laborra/beantrace/model/Vertex.java
// public class Vertex {
//     private Class<?> clazz;
//     private String id;
//     private Set<Edge> references = new HashSet<>();
//     private Set<Attribute> attributes = new HashSet<>();
// 
//     public Vertex(Class<?> clazz, String id) {
//         this(clazz, id, new HashSet<Edge>(), new HashSet<Attribute>());
//     }
// 
//     public Vertex(Class<?> clazz, String id, Set<Edge> references, Set<Attribute> attributes) {
//         this.id = id;
//         this.clazz = clazz;
//         this.references = references;
//         this.attributes = attributes;
//     }
// 
//     public Set<Edge> getReferences() {
//         return references;
//     }
// 
//     public Set<Attribute> getAttributes() {
//         return attributes;
//     }
// 
//     public Class<?> getClazz() {
//         return clazz;
//     }
// 
//     public String getId() {
//         return id;
//     }
// }


import org.laborra.beantrace.VertexFieldAdder;
import org.laborra.beantrace.internal.ReflectUtils;
import org.laborra.beantrace.model.Edge;
import org.laborra.beantrace.model.Vertex;
import java.lang.reflect.Array;
import java.util.List;
import java.util.Map;
                    vertexHandler.handle(vertex, subject, vertexFieldAdder);
                    return;
                }
            }
        }
    }

    class MapVertexHandler extends TypeBasedHandler<Map<Object, Object>> {

        public MapVertexHandler() {
            super(Map.class);
        }

        @Override
        public void typedHandle(Vertex vertex, Map<Object, Object> subject, VertexFieldAdder vertexFieldAdder) {
            int i = -1;
            for (Map.Entry<Object, Object> entry : subject.entrySet()) {
                i++;
                final Object key = entry.getKey();
                final Object value = entry.getValue();
                final boolean primitiveKey = ReflectUtils.isPrimitive(key.getClass());

                if (primitiveKey) {
                    vertexFieldAdder.addField(vertex, key.toString(), value);
                }

                if (!primitiveKey) {
                    final Vertex entryVertex = new Vertex(Map.Entry.class, System.identityHashCode(entry) + "");
                    vertexFieldAdder.addField(entryVertex, "key", key);
                    vertexFieldAdder.addField(entryVertex, "value", value);
// Path: src/main/java/org/laborra/beantrace/VertexFieldAdder.java
// public interface VertexFieldAdder {
//     void addField(Vertex vertex, String fieldName, Object item);
// }
// 
// Path: src/main/java/org/laborra/beantrace/internal/ReflectUtils.java
// public class ReflectUtils {
// 
//     private static final Set<Class> PRIMITIVE_TYPES = Sets.newHashSet(
//             (Class) Integer.class, Long.class, String.class, Boolean.class, Byte.class,
//             Character.class, Float.class, Double.class, Short.class
//     );
// 
//     /**
//      * Returns true if the given type is intended to be "primitive" by the library
//      *
//      * @param type The class to check
//      * @return True if the give type is primitive, false otherwise
//      */
//     public static boolean isPrimitive(Class<?> type) {
//         return type.isPrimitive() || PRIMITIVE_TYPES.contains(type);
//     }
// 
//     public static List<Field> getFieldFromClassHierarchy(Class<?> clazz) {
//         if (Object.class.equals(clazz)) {
//             return Collections.emptyList();
//         }
//         final ArrayList<Field> fields = Lists.newArrayList(clazz.getDeclaredFields());
//         fields.addAll(getFieldFromClassHierarchy(clazz.getSuperclass()));
//         return fields;
//     }
// }
// 
// Path: src/main/java/org/laborra/beantrace/model/Edge.java
// public class Edge {
//     private String name;
//     private Vertex to;
// 
//     public Edge(String name, Vertex to) {
//         this.name = name;
//         this.to = to;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public Vertex getTo() {
//         return to;
//     }
// }
// 
// Path: src/main/java/org/laborra/beantrace/model/Vertex.java
// public class Vertex {
//     private Class<?> clazz;
//     private String id;
//     private Set<Edge> references = new HashSet<>();
//     private Set<Attribute> attributes = new HashSet<>();
// 
//     public Vertex(Class<?> clazz, String id) {
//         this(clazz, id, new HashSet<Edge>(), new HashSet<Attribute>());
//     }
// 
//     public Vertex(Class<?> clazz, String id, Set<Edge> references, Set<Attribute> attributes) {
//         this.id = id;
//         this.clazz = clazz;
//         this.references = references;
//         this.attributes = attributes;
//     }
// 
//     public Set<Edge> getReferences() {
//         return references;
//     }
// 
//     public Set<Attribute> getAttributes() {
//         return attributes;
//     }
// 
//     public Class<?> getClazz() {
//         return clazz;
//     }
// 
//     public String getId() {
//         return id;
//     }
// }


// Path: src/main/java/org/laborra/beantrace/handlers/VertexHandler.java
import org.laborra.beantrace.VertexFieldAdder;
import org.laborra.beantrace.internal.ReflectUtils;
import org.laborra.beantrace.model.Edge;
import org.laborra.beantrace.model.Vertex;
import java.lang.reflect.Array;
import java.util.List;
import java.util.Map;

                    vertexHandler.handle(vertex, subject, vertexFieldAdder);
                    return;
                }
            }
        }
    }

    class MapVertexHandler extends TypeBasedHandler<Map<Object, Object>> {

        public MapVertexHandler() {
            super(Map.class);
        }

        @Override
        public void typedHandle(Vertex vertex, Map<Object, Object> subject, VertexFieldAdder vertexFieldAdder) {
            int i = -1;
            for (Map.Entry<Object, Object> entry : subject.entrySet()) {
                i++;
                final Object key = entry.getKey();
                final Object value = entry.getValue();
                final boolean primitiveKey = ReflectUtils.isPrimitive(key.getClass());

                if (primitiveKey) {
                    vertexFieldAdder.addField(vertex, key.toString(), value);
                }

                if (!primitiveKey) {
                    final Vertex entryVertex = new Vertex(Map.Entry.class, System.identityHashCode(entry) + "");
                    vertexFieldAdder.addField(entryVertex, "key", key);
                    vertexFieldAdder.addField(entryVertex, "value", value);
                    vertex.getReferences().add(new Edge("entry_" + i, entryVertex));