// 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 -> Container, contents, Item_List {{
    Container it = (Container) history.peek();
    Item_List p = new Item_List();
    it.set_contents(p);
    history.push(p);
  }}

  after -> Container, contents, Item_List {{
    history.pop();
  }}

  before -> Container, capacity, Capacity {{
    Container it = (Container) history.peek();
    Capacity p = new Capacity();
    it.set_capacity(p);
    history.push(p);
  }}

  after -> Container, capacity, Capacity {{
    history.pop();
  }}

  before -> Simple, name, Ident {{
    Simple it = (Simple) history.peek();
    it.set_name(dest);
  }}

  before -> Simple, w, Weight {{
    Simple it = (Simple) history.peek();
    Weight p = new Weight();
    it.set_w(p);
    history.push(p);
  }}

  after -> Simple, w, Weight {{
    history.pop();
  }}

  before -> Capacity, i, Integer {{
    Capacity it = (Capacity) history.peek();
    it.set_i(dest);
  }}

  before -> Weight, i, Integer {{
    Weight it = (Weight) history.peek();
    it.set_i(dest);
  }}

  before -> CheckingVisitorDJ, iV, DifferenceVisitorDJ {{
    CheckingVisitorDJ it = (CheckingVisitorDJ) history.peek();
    DifferenceVisitorDJ p = new DifferenceVisitorDJ();
    it.set_iV(p);
    history.push(p);
  }}

  after -> CheckingVisitorDJ, iV, DifferenceVisitorDJ {{
    history.pop();
  }}

  before -> CheckingVisitorDJ, violations, int {{
    CheckingVisitorDJ it = (CheckingVisitorDJ) history.peek();
    it.set_violations(dest);
  }}

  before -> SummingVisitorDJ, total, int {{
    SummingVisitorDJ it = (SummingVisitorDJ) history.peek();
    it.set_total(dest);
  }}

  before -> DifferenceVisitorDJ, difference, int {{
    DifferenceVisitorDJ it = (DifferenceVisitorDJ) history.peek();
    it.set_difference(dest);
  }}

  before -> DifferenceVisitorDJ, stack, Stack {{
    DifferenceVisitorDJ it = (DifferenceVisitorDJ) history.peek();
    it.set_stack(dest);
  }}

  before -> DifferenceVisitorDJ, sV, SummingVisitorDJ {{
    DifferenceVisitorDJ it = (DifferenceVisitorDJ) history.peek();
    SummingVisitorDJ p = new SummingVisitorDJ();
    it.set_sV(p);
    history.push(p);
  }}

  after -> DifferenceVisitorDJ, sV, SummingVisitorDJ {{
    history.pop();
  }}

  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);
  }}

  before -> Item_List, first, Nonempty_Item_List {{
    Item_List it = (Item_List) history.peek();
    Nonempty_Item_List p = new Nonempty_Item_List();
    it.set_first(p);
    history.push(p);
  }}

  after -> Item_List, first, Nonempty_Item_List {{
    history.pop();
  }}

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

  after -> Nonempty_Item_List, it, Item {{
    history.pop();
  }}

  before -> Nonempty_Item_List, next, Nonempty_Item_List {{
    Nonempty_Item_List it = (Nonempty_Item_List) history.peek();
    Nonempty_Item_List p = new Nonempty_Item_List();
    it.set_next(p);
    history.push(p);
  }}

  after -> Nonempty_Item_List, next, Nonempty_Item_List {{
    history.pop();
  }}

}