// This file is automatically generated by DemeterJ.

CopyVisitor {
  {{
    private java.util.Stack history = new java.util.Stack();
    public CopyVisitor(Class firstClass) {
      try {
        history.push(firstClass.newInstance());
      } catch(Exception e) {
        e.printStackTrace();
      }
    }
  }}
  get copy {{ return history.peek(); }}
  return Object {{ get_copy() }}


  before -> Main, c, Container {{
    Main it = (Main) history.peek();
    Container p = new Container();
    it.set_c(p);
    history.push(p);
  }}

  after -> Main, c, Container {{
    history.pop();
  }}

  before -> Container, cap, int {{
    Container it = (Container) history.peek();
    it.set_cap(dest);
  }}

  before -> Container, items, ItemList {{
    Container it = (Container) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_items((ItemList) p);
    history.push(p);
  }}

  after -> Container, items, ItemList {{
    history.pop();
  }}

  before -> ItemCons, first, Item {{
    ItemCons it = (ItemCons) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_first((Item) p);
    history.push(p);
  }}

  after -> ItemCons, first, Item {{
    history.pop();
  }}

  before -> ItemCons, rest, ItemList {{
    ItemCons it = (ItemCons) history.peek();
    Class c = dest.getClass();
    Object p = null;
    try {
      p = c.newInstance();
    } catch(Exception e) {
      e.printStackTrace();
    }
    it.set_rest((ItemList) p);
    history.push(p);
  }}

  after -> ItemCons, rest, ItemList {{
    history.pop();
  }}

  before -> Element, weight, int {{
    Element it = (Element) history.peek();
    it.set_weight(dest);
  }}

  before -> Pair, w, int {{
    Pair it = (Pair) history.peek();
    it.set_w(dest);
  }}

  before -> Pair, v, int {{
    Pair it = (Pair) history.peek();
    it.set_v(dest);
  }}

  before -> PrintVisitor, indent, int {{
    PrintVisitor it = (PrintVisitor) history.peek();
    it.set_indent(dest);
  }}

  before -> PrintVisitor, needSpace, boolean {{
    PrintVisitor it = (PrintVisitor) history.peek();
    it.set_needSpace(dest);
  }}

  before -> SubgraphVisitor, is_equal, boolean {{
    SubgraphVisitor it = (SubgraphVisitor) history.peek();
    it.set_is_equal(dest);
  }}

  before -> EqualVisitor, is_equal, boolean {{
    EqualVisitor it = (EqualVisitor) history.peek();
    it.set_is_equal(dest);
  }}

  before -> DisplayVisitor, indent, int {{
    DisplayVisitor it = (DisplayVisitor) history.peek();
    it.set_indent(dest);
  }}

  before -> TraceVisitor, indent, int {{
    TraceVisitor it = (TraceVisitor) history.peek();
    it.set_indent(dest);
  }}

}