// 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 -> FileSystem, root, CompoundFile {{
    FileSystem it = (FileSystem) history.peek();
    CompoundFile p = new CompoundFile();
    it.set_root(p);
    history.push(p);
  }}

  after -> FileSystem, root, CompoundFile {{
    history.pop();
  }}

  before -> File, f, FileName {{
    File it = (File) history.peek();
    FileName p = new FileName();
    it.set_f(p);
    history.push(p);
  }}

  after -> File, f, FileName {{
    history.pop();
  }}

  before -> CompoundFile, contents, File_PList {{
    CompoundFile it = (CompoundFile) history.peek();
    File_PList p = new File_PList();
    it.set_contents(p);
    history.push(p);
  }}

  after -> CompoundFile, contents, File_PList {{
    history.pop();
  }}

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

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

  before -> Commands, command_list, Command_List {{
    Commands it = (Commands) history.peek();
    Command_List p = new Command_List();
    it.set_command_list(p);
    history.push(p);
  }}

  after -> Commands, command_list, Command_List {{
    history.pop();
  }}

  before -> MakeDirectory, directoryname, DirectoryName {{
    MakeDirectory it = (MakeDirectory) history.peek();
    DirectoryName p = new DirectoryName();
    it.set_directoryname(p);
    history.push(p);
  }}

  after -> MakeDirectory, directoryname, DirectoryName {{
    history.pop();
  }}

  before -> ChangeDirectoryDown, directoryname, DirectoryName {{
    ChangeDirectoryDown it = (ChangeDirectoryDown) history.peek();
    DirectoryName p = new DirectoryName();
    it.set_directoryname(p);
    history.push(p);
  }}

  after -> ChangeDirectoryDown, directoryname, DirectoryName {{
    history.pop();
  }}

  before -> RecursiveCopy, source, FileName {{
    RecursiveCopy it = (RecursiveCopy) history.peek();
    FileName p = new FileName();
    it.set_source(p);
    history.push(p);
  }}

  after -> RecursiveCopy, source, FileName {{
    history.pop();
  }}

  before -> RecursiveCopy, target, FileName {{
    RecursiveCopy it = (RecursiveCopy) history.peek();
    FileName p = new FileName();
    it.set_target(p);
    history.push(p);
  }}

  after -> RecursiveCopy, target, FileName {{
    history.pop();
  }}

  before -> SymbolicLink, from, FileName {{
    SymbolicLink it = (SymbolicLink) history.peek();
    FileName p = new FileName();
    it.set_from(p);
    history.push(p);
  }}

  after -> SymbolicLink, from, FileName {{
    history.pop();
  }}

  before -> SymbolicLink, to, FileName {{
    SymbolicLink it = (SymbolicLink) history.peek();
    FileName p = new FileName();
    it.set_to(p);
    history.push(p);
  }}

  after -> SymbolicLink, to, FileName {{
    history.pop();
  }}

  before -> RemoveDirectory, directoryname, DirectoryName {{
    RemoveDirectory it = (RemoveDirectory) history.peek();
    DirectoryName p = new DirectoryName();
    it.set_directoryname(p);
    history.push(p);
  }}

  after -> RemoveDirectory, directoryname, DirectoryName {{
    history.pop();
  }}

  before -> CreateEmptyFile, filename, FileName {{
    CreateEmptyFile it = (CreateEmptyFile) history.peek();
    FileName p = new FileName();
    it.set_filename(p);
    history.push(p);
  }}

  after -> CreateEmptyFile, filename, FileName {{
    history.pop();
  }}

  before -> RemoveFile, filename, FileName {{
    RemoveFile it = (RemoveFile) history.peek();
    FileName p = new FileName();
    it.set_filename(p);
    history.push(p);
  }}

  after -> RemoveFile, filename, FileName {{
    history.pop();
  }}

  before -> Find, directoryname, DirectoryName {{
    Find it = (Find) history.peek();
    DirectoryName p = new DirectoryName();
    it.set_directoryname(p);
    history.push(p);
  }}

  after -> Find, directoryname, DirectoryName {{
    history.pop();
  }}

  before -> Echo, message, Message {{
    Echo it = (Echo) history.peek();
    Message p = new Message();
    it.set_message(p);
    history.push(p);
  }}

  after -> Echo, message, Message {{
    history.pop();
  }}

  before -> FileName, ident, Ident {{
    FileName it = (FileName) history.peek();
    it.set_ident(dest);
  }}

  before -> DirectoryName, ident, Ident {{
    DirectoryName it = (DirectoryName) history.peek();
    it.set_ident(dest);
  }}

  before -> Message, string, String {{
    Message it = (Message) history.peek();
    it.set_string(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 -> File_PList, first, Nonempty_File_PList {{
    File_PList it = (File_PList) history.peek();
    Nonempty_File_PList p = new Nonempty_File_PList();
    it.set_first(p);
    history.push(p);
  }}

  after -> File_PList, first, Nonempty_File_PList {{
    history.pop();
  }}

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

  after -> Command_List, first, Nonempty_Command_List {{
    history.pop();
  }}

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

  after -> Nonempty_File_PList, it, File {{
    history.pop();
  }}

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

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

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

  after -> Nonempty_Command_List, it, Command {{
    history.pop();
  }}

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

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

}