// 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, s, String {{
    Main it = (Main) history.peek();
    it.set_s(dest);
  }}

  before -> NodeInt, data, Integer {{
    NodeInt it = (NodeInt) history.peek();
    it.set_data(dest);
  }}

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

  after -> NodeInt, left, BSTInt {{
    history.pop();
  }}

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

  after -> NodeInt, right, BSTInt {{
    history.pop();
  }}

  before -> NodeInt1, data, Integer {{
    NodeInt1 it = (NodeInt1) history.peek();
    it.set_data(dest);
  }}

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

  after -> NodeInt1, left, BSTInt2 {{
    history.pop();
  }}

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

  after -> NodeInt1, right, BSTInt2 {{
    history.pop();
  }}

  before -> NodeInt2, data, Integer {{
    NodeInt2 it = (NodeInt2) history.peek();
    it.set_data(dest);
  }}

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

  after -> NodeInt2, left, BSTInt3 {{
    history.pop();
  }}

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

  after -> NodeInt2, right, BSTInt4 {{
    history.pop();
  }}

  before -> NodeInt3, data, Integer {{
    NodeInt3 it = (NodeInt3) history.peek();
    it.set_data(dest);
  }}

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

  after -> NodeInt3, left, BSTInt5 {{
    history.pop();
  }}

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

  after -> NodeInt3, right, BSTInt5 {{
    history.pop();
  }}

  before -> DiameterPair, height, int {{
    DiameterPair it = (DiameterPair) history.peek();
    it.set_height(dest);
  }}

  before -> DiameterPair, diameter, int {{
    DiameterPair it = (DiameterPair) history.peek();
    it.set_diameter(dest);
  }}

  before -> CheckPair, res, boolean {{
    CheckPair it = (CheckPair) history.peek();
    it.set_res(dest);
  }}

  before -> CheckPair, data, int {{
    CheckPair it = (CheckPair) history.peek();
    it.set_data(dest);
  }}

  before -> Down, parent, NodeInt {{
    Down it = (Down) history.peek();
    NodeInt p = new NodeInt();
    it.set_parent(p);
    history.push(p);
  }}

  after -> Down, parent, NodeInt {{
    history.pop();
  }}

  before -> DownHeight, height, int {{
    DownHeight it = (DownHeight) history.peek();
    it.set_height(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);
  }}

}