// 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 -> Blackboard, players, Player_List {{
    Blackboard it = (Blackboard) history.peek();
    Player_List p = new Player_List();
    it.set_players(p);
    history.push(p);
  }}

  after -> Blackboard, players, Player_List {{
    history.pop();
  }}

  before -> Blackboard, store, Store {{
    Blackboard it = (Blackboard) history.peek();
    Store p = new Store();
    it.set_store(p);
    history.push(p);
  }}

  after -> Blackboard, store, Store {{
    history.pop();
  }}

  before -> Blackboard, transactions, Transaction_List {{
    Blackboard it = (Blackboard) history.peek();
    Transaction_List p = new Transaction_List();
    it.set_transactions(p);
    history.push(p);
  }}

  after -> Blackboard, transactions, Transaction_List {{
    history.pop();
  }}

  before -> Blackboard, history, History {{
    Blackboard it = (Blackboard) history.peek();
    History p = new History();
    it.set_history(p);
    history.push(p);
  }}

  after -> Blackboard, history, History {{
    history.pop();
  }}

  before -> Player, name, PlayerName {{
    Player it = (Player) history.peek();
    PlayerName p = new PlayerName();
    it.set_name(p);
    history.push(p);
  }}

  after -> Player, name, PlayerName {{
    history.pop();
  }}

  before -> Player, account, Money {{
    Player it = (Player) history.peek();
    Money p = new Money();
    it.set_account(p);
    history.push(p);
  }}

  after -> Player, account, Money {{
    history.pop();
  }}

  before -> Player, turn, boolean {{
    Player it = (Player) history.peek();
    it.set_turn(dest);
  }}

  before -> Player, publickey, PublicKey {{
    Player it = (Player) history.peek();
    PublicKey p = new PublicKey();
    it.set_publickey(p);
    history.push(p);
  }}

  after -> Player, publickey, PublicKey {{
    history.pop();
  }}

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

  before -> History, transaction_elist, Transaction_EList {{
    History it = (History) history.peek();
    Transaction_EList p = new Transaction_EList();
    it.set_transaction_elist(p);
    history.push(p);
  }}

  after -> History, transaction_elist, Transaction_EList {{
    history.pop();
  }}

  before -> Store, derivative_elist, Derivative_EList {{
    Store it = (Store) history.peek();
    Derivative_EList p = new Derivative_EList();
    it.set_derivative_elist(p);
    history.push(p);
  }}

  after -> Store, derivative_elist, Derivative_EList {{
    history.pop();
  }}

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

  after -> Transaction, trans, Trans {{
    history.pop();
  }}

  before -> Trans, playername, PlayerName {{
    Trans it = (Trans) history.peek();
    PlayerName p = new PlayerName();
    it.set_playername(p);
    history.push(p);
  }}

  after -> Trans, playername, PlayerName {{
    history.pop();
  }}

  before -> Trans, derivative, Derivative {{
    Trans it = (Trans) history.peek();
    Derivative p = new Derivative();
    it.set_derivative(p);
    history.push(p);
  }}

  after -> Trans, derivative, Derivative {{
    history.pop();
  }}

  before -> Trans, digitalsignature, DigitalSignature {{
    Trans it = (Trans) history.peek();
    DigitalSignature p = new DigitalSignature();
    it.set_digitalsignature(p);
    history.push(p);
  }}

  after -> Trans, digitalsignature, DigitalSignature {{
    history.pop();
  }}

  before -> Derivative, name, DerivativeName {{
    Derivative it = (Derivative) history.peek();
    DerivativeName p = new DerivativeName();
    it.set_name(p);
    history.push(p);
  }}

  after -> Derivative, name, DerivativeName {{
    history.pop();
  }}

  before -> Derivative, creator, PlayerName {{
    Derivative it = (Derivative) history.peek();
    PlayerName p = new PlayerName();
    it.set_creator(p);
    history.push(p);
  }}

  after -> Derivative, creator, PlayerName {{
    history.pop();
  }}

  before -> Derivative, price, Money {{
    Derivative it = (Derivative) history.peek();
    Money p = new Money();
    it.set_price(p);
    history.push(p);
  }}

  after -> Derivative, price, Money {{
    history.pop();
  }}

  before -> Derivative, type, DerivativeType {{
    Derivative it = (Derivative) history.peek();
    DerivativeType p = new DerivativeType();
    it.set_type(p);
    history.push(p);
  }}

  after -> Derivative, type, DerivativeType {{
    history.pop();
  }}

  before -> Derivative, boughtBy, PlayerName {{
    Derivative it = (Derivative) history.peek();
    PlayerName p = new PlayerName();
    it.set_boughtBy(p);
    history.push(p);
  }}

  after -> Derivative, boughtBy, PlayerName {{
    history.pop();
  }}

  before -> Derivative, rawMaterial, RawMaterial {{
    Derivative it = (Derivative) history.peek();
    RawMaterial p = new RawMaterial();
    it.set_rawMaterial(p);
    history.push(p);
  }}

  after -> Derivative, rawMaterial, RawMaterial {{
    history.pop();
  }}

  before -> Derivative, finishedProduct, FinishedProduct {{
    Derivative it = (Derivative) history.peek();
    FinishedProduct p = new FinishedProduct();
    it.set_finishedProduct(p);
    history.push(p);
  }}

  after -> Derivative, finishedProduct, FinishedProduct {{
    history.pop();
  }}

  before -> FinishedProduct, assignment, Assignment {{
    FinishedProduct it = (FinishedProduct) history.peek();
    Assignment p = new Assignment();
    it.set_assignment(p);
    history.push(p);
  }}

  after -> FinishedProduct, assignment, Assignment {{
    history.pop();
  }}

  before -> FinishedProduct, quality, Money {{
    FinishedProduct it = (FinishedProduct) history.peek();
    Money p = new Money();
    it.set_quality(p);
    history.push(p);
  }}

  after -> FinishedProduct, quality, Money {{
    history.pop();
  }}

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

  before -> Money, price, float {{
    Money it = (Money) history.peek();
    it.set_price(dest);
  }}

  before -> DerivativeType, clausetype_list, ClauseType_List {{
    DerivativeType it = (DerivativeType) history.peek();
    ClauseType_List p = new ClauseType_List();
    it.set_clausetype_list(p);
    history.push(p);
  }}

  after -> DerivativeType, clausetype_list, ClauseType_List {{
    history.pop();
  }}

  before -> ClauseType, total_literal_num, TotalLiteralNum {{
    ClauseType it = (ClauseType) history.peek();
    TotalLiteralNum p = new TotalLiteralNum();
    it.set_total_literal_num(p);
    history.push(p);
  }}

  after -> ClauseType, total_literal_num, TotalLiteralNum {{
    history.pop();
  }}

  before -> ClauseType, pos_literal_num, PosLiteralNum {{
    ClauseType it = (ClauseType) history.peek();
    PosLiteralNum p = new PosLiteralNum();
    it.set_pos_literal_num(p);
    history.push(p);
  }}

  after -> ClauseType, pos_literal_num, PosLiteralNum {{
    history.pop();
  }}

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

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

  before -> RawMaterial, clause_list, Clause_List {{
    RawMaterial it = (RawMaterial) history.peek();
    Clause_List p = new Clause_List();
    it.set_clause_list(p);
    history.push(p);
  }}

  after -> RawMaterial, clause_list, Clause_List {{
    history.pop();
  }}

  before -> Clause, weight, Weight {{
    Clause it = (Clause) history.peek();
    Weight p = new Weight();
    it.set_weight(p);
    history.push(p);
  }}

  after -> Clause, weight, Weight {{
    history.pop();
  }}

  before -> Clause, literal_list, Literal_List {{
    Clause it = (Clause) history.peek();
    Literal_List p = new Literal_List();
    it.set_literal_list(p);
    history.push(p);
  }}

  after -> Clause, literal_list, Literal_List {{
    history.pop();
  }}

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

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

  after -> Literal, lit, Lit {{
    history.pop();
  }}

  before -> Lit, variable, Variable {{
    Lit it = (Lit) history.peek();
    Variable p = new Variable();
    it.set_variable(p);
    history.push(p);
  }}

  after -> Lit, variable, Variable {{
    history.pop();
  }}

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

  before -> Assignment, literal_list, Literal_List {{
    Assignment it = (Assignment) history.peek();
    Literal_List p = new Literal_List();
    it.set_literal_list(p);
    history.push(p);
  }}

  after -> Assignment, literal_list, Literal_List {{
    history.pop();
  }}

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

  before -> Main, s, String {{
    Main it = (Main) history.peek();
    it.set_s(dest);
  }}

  before -> CTVisitor, pos, int {{
    CTVisitor it = (CTVisitor) history.peek();
    it.set_pos(dest);
  }}

  before -> CTVisitor, neg, int {{
    CTVisitor it = (CTVisitor) history.peek();
    it.set_neg(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);
  }}

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

  after -> Player_List, first, Nonempty_Player_List {{
    history.pop();
  }}

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

  after -> Transaction_List, first, Nonempty_Transaction_List {{
    history.pop();
  }}

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

  after -> Transaction_EList, first, Nonempty_Transaction_EList {{
    history.pop();
  }}

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

  after -> Derivative_EList, first, Nonempty_Derivative_EList {{
    history.pop();
  }}

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

  after -> ClauseType_List, first, Nonempty_ClauseType_List {{
    history.pop();
  }}

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

  after -> Clause_List, first, Nonempty_Clause_List {{
    history.pop();
  }}

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

  after -> Literal_List, first, Nonempty_Literal_List {{
    history.pop();
  }}

  before -> Nonempty_Player_List, it, Player {{
    Nonempty_Player_List it = (Nonempty_Player_List) history.peek();
    Player p = new Player();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Player_List, it, Player {{
    history.pop();
  }}

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

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

  before -> Nonempty_Transaction_List, it, Transaction {{
    Nonempty_Transaction_List it = (Nonempty_Transaction_List) history.peek();
    Transaction p = new Transaction();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Transaction_List, it, Transaction {{
    history.pop();
  }}

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

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

  before -> Nonempty_Transaction_EList, it, Transaction {{
    Nonempty_Transaction_EList it = (Nonempty_Transaction_EList) history.peek();
    Transaction p = new Transaction();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Transaction_EList, it, Transaction {{
    history.pop();
  }}

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

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

  before -> Nonempty_Derivative_EList, it, Derivative {{
    Nonempty_Derivative_EList it = (Nonempty_Derivative_EList) history.peek();
    Derivative p = new Derivative();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Derivative_EList, it, Derivative {{
    history.pop();
  }}

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

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

  before -> Nonempty_ClauseType_List, it, ClauseType {{
    Nonempty_ClauseType_List it = (Nonempty_ClauseType_List) history.peek();
    ClauseType p = new ClauseType();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_ClauseType_List, it, ClauseType {{
    history.pop();
  }}

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

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

  before -> Nonempty_Clause_List, it, Clause {{
    Nonempty_Clause_List it = (Nonempty_Clause_List) history.peek();
    Clause p = new Clause();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Clause_List, it, Clause {{
    history.pop();
  }}

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

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

  before -> Nonempty_Literal_List, it, Literal {{
    Nonempty_Literal_List it = (Nonempty_Literal_List) history.peek();
    Literal p = new Literal();
    it.set_it(p);
    history.push(p);
  }}

  after -> Nonempty_Literal_List, it, Literal {{
    history.pop();
  }}

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

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

}