// 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/model/Attribute.java
// public class Attribute<T> {
//     private String name;
//     private T value;
// 
//     public Attribute(String name, T value) {
//         this.name = name;
//         this.value = value;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public T getValue() {
//         return value;
//     }
// }
// 
// 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.model.Attribute;
import org.laborra.beantrace.model.Vertex;
import java.util.HashMap;
import java.util.Map;
package org.laborra.beantrace.handlers;



/**
 * This handler manage system object like System.out, in order to stop the scanning
 * and collect more useful information.
 */
public class SystemObjectHandler implements VertexHandler {

    private final Map<Integer, String> hashCodeToName;

    public SystemObjectHandler(Map<Integer, String> hashCodeToName) {
        this.hashCodeToName = hashCodeToName;
    }

    public static SystemObjectHandler makeDefault() {
        final Map<Integer, String> map = new HashMap<>();
        map.put(System.out.hashCode(), "System OUT");
        map.put(System.err.hashCode(), "System ERR");
        return new SystemObjectHandler(map);
    }

    @Override
    public boolean canHandle(Object subject) {
        return hashCodeToName.containsKey(subject.hashCode());
    }

    @Override
    public void handle(Vertex vertex, Object subject, VertexFieldAdder vertexFieldAdder) {
// 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/model/Attribute.java
// public class Attribute<T> {
//     private String name;
//     private T value;
// 
//     public Attribute(String name, T value) {
//         this.name = name;
//         this.value = value;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public T getValue() {
//         return value;
//     }
// }
// 
// 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/SystemObjectHandler.java
import org.laborra.beantrace.VertexFieldAdder;
import org.laborra.beantrace.model.Attribute;
import org.laborra.beantrace.model.Vertex;
import java.util.HashMap;
import java.util.Map;

package org.laborra.beantrace.handlers;



/**
 * This handler manage system object like System.out, in order to stop the scanning
 * and collect more useful information.
 */
public class SystemObjectHandler implements VertexHandler {

    private final Map<Integer, String> hashCodeToName;

    public SystemObjectHandler(Map<Integer, String> hashCodeToName) {
        this.hashCodeToName = hashCodeToName;
    }

    public static SystemObjectHandler makeDefault() {
        final Map<Integer, String> map = new HashMap<>();
        map.put(System.out.hashCode(), "System OUT");
        map.put(System.err.hashCode(), "System ERR");
        return new SystemObjectHandler(map);
    }

    @Override
    public boolean canHandle(Object subject) {
        return hashCodeToName.containsKey(subject.hashCode());
    }

    @Override
    public void handle(Vertex vertex, Object subject, VertexFieldAdder vertexFieldAdder) {
        vertex.getAttributes().add(new Attribute<>(