// 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, func, FuncDef {{ Main it = (Main) history.peek(); FuncDef p = new FuncDef(); it.set_func(p); history.push(p); }} after -> Main, func, FuncDef {{ history.pop(); }} before -> Main, cd, ClassDefList {{ Main it = (Main) history.peek(); Class c = dest.getClass(); Object p = null; try { p = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } it.set_cd((ClassDefList) p); history.push(p); }} after -> Main, cd, ClassDefList {{ history.pop(); }} before -> FuncDef, methodlist, MethodList {{ FuncDef it = (FuncDef) history.peek(); Class c = dest.getClass(); Object p = null; try { p = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } it.set_methodlist((MethodList) p); history.push(p); }} after -> FuncDef, methodlist, MethodList {{ history.pop(); }} before -> MethodDef, ret, TypeName {{ MethodDef it = (MethodDef) history.peek(); TypeName p = new TypeName(); it.set_ret(p); history.push(p); }} after -> MethodDef, ret, TypeName {{ history.pop(); }} before -> MethodDef, arg, TypeName {{ MethodDef it = (MethodDef) history.peek(); TypeName p = new TypeName(); it.set_arg(p); history.push(p); }} after -> MethodDef, arg, TypeName {{ history.pop(); }} before -> MethodCons, first, MethodDef {{ MethodCons it = (MethodCons) history.peek(); MethodDef p = new MethodDef(); it.set_first(p); history.push(p); }} after -> MethodCons, first, MethodDef {{ history.pop(); }} before -> MethodCons, rest, MethodList {{ MethodCons it = (MethodCons) history.peek(); Class c = dest.getClass(); Object p = null; try { p = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } it.set_rest((MethodList) p); history.push(p); }} after -> MethodCons, rest, MethodList {{ history.pop(); }} before -> ClassDef, name, Ident {{ ClassDef it = (ClassDef) history.peek(); it.set_name(dest); }} before -> ClassDef, decl, Decl {{ ClassDef it = (ClassDef) history.peek(); Class c = dest.getClass(); Object p = null; try { p = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } it.set_decl((Decl) p); history.push(p); }} after -> ClassDef, decl, Decl {{ history.pop(); }} before -> Abstract, subtypes, NESubtypeList {{ Abstract it = (Abstract) history.peek(); NESubtypeList p = new NESubtypeList(); it.set_subtypes(p); history.push(p); }} after -> Abstract, subtypes, NESubtypeList {{ history.pop(); }} before -> Concrete, fields, FieldList {{ Concrete it = (Concrete) history.peek(); Class c = dest.getClass(); Object p = null; try { p = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } it.set_fields((FieldList) p); history.push(p); }} after -> Concrete, fields, FieldList {{ history.pop(); }} before -> Field, name, Ident {{ Field it = (Field) history.peek(); it.set_name(dest); }} before -> Field, typename, TypeName {{ Field it = (Field) history.peek(); TypeName p = new TypeName(); it.set_typename(p); history.push(p); }} after -> Field, typename, TypeName {{ history.pop(); }} before -> TypeName, name, Ident {{ TypeName it = (TypeName) history.peek(); it.set_name(dest); }} before -> ClassDefCons, first, ClassDef {{ ClassDefCons it = (ClassDefCons) history.peek(); ClassDef p = new ClassDef(); it.set_first(p); history.push(p); }} after -> ClassDefCons, first, ClassDef {{ history.pop(); }} before -> ClassDefCons, rest, ClassDefList {{ ClassDefCons it = (ClassDefCons) history.peek(); Class c = dest.getClass(); Object p = null; try { p = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } it.set_rest((ClassDefList) p); history.push(p); }} after -> ClassDefCons, rest, ClassDefList {{ history.pop(); }} before -> FieldCons, first, Field {{ FieldCons it = (FieldCons) history.peek(); Field p = new Field(); it.set_first(p); history.push(p); }} after -> FieldCons, first, Field {{ history.pop(); }} before -> FieldCons, rest, FieldList {{ FieldCons it = (FieldCons) history.peek(); Class c = dest.getClass(); Object p = null; try { p = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } it.set_rest((FieldList) p); history.push(p); }} after -> FieldCons, rest, FieldList {{ history.pop(); }} before -> NESubtypeList, first, TypeName {{ NESubtypeList it = (NESubtypeList) history.peek(); TypeName p = new TypeName(); it.set_first(p); history.push(p); }} after -> NESubtypeList, first, TypeName {{ history.pop(); }} before -> NESubtypeList, rest, SubtypeList {{ NESubtypeList it = (NESubtypeList) history.peek(); Class c = dest.getClass(); Object p = null; try { p = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } it.set_rest((SubtypeList) p); history.push(p); }} after -> NESubtypeList, rest, SubtypeList {{ history.pop(); }} before -> SubtypeCons, first, TypeName {{ SubtypeCons it = (SubtypeCons) history.peek(); TypeName p = new TypeName(); it.set_first(p); history.push(p); }} after -> SubtypeCons, first, TypeName {{ history.pop(); }} before -> SubtypeCons, rest, SubtypeList {{ SubtypeCons it = (SubtypeCons) history.peek(); Class c = dest.getClass(); Object p = null; try { p = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } it.set_rest((SubtypeList) p); history.push(p); }} after -> SubtypeCons, rest, SubtypeList {{ history.pop(); }} before -> StringCons, first, String {{ StringCons it = (StringCons) history.peek(); it.set_first(dest); }} before -> StringCons, rest, StringList {{ StringCons it = (StringCons) history.peek(); Class c = dest.getClass(); Object p = null; try { p = c.newInstance(); } catch(Exception e) { e.printStackTrace(); } it.set_rest((StringList) p); history.push(p); }} after -> StringCons, rest, StringList {{ 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); }} }