org.argouml.language.java.generator
Class CodePieceCollector

java.lang.Object
  extended byorg.argouml.language.java.generator.CodePieceCollector

public class CodePieceCollector
extends java.lang.Object

This class collects pieces of code when a source file is parsed, and then updates the file with new code from the model.


Field Summary
private  java.util.Vector codePieces
          Code pieces the parser found.
 
Constructor Summary
CodePieceCollector()
          Constructor.
 
Method Summary
 void add(NamedCodePiece codePiece)
          The parser adds a code piece here.
 void filter(java.io.File source, java.io.File destination, java.lang.Object mNamespace)
          Replace all the code pieces in a source file with new code from the model, or maintain them if nothing is found in the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

codePieces

private java.util.Vector codePieces
Code pieces the parser found.

Constructor Detail

CodePieceCollector

public CodePieceCollector()
Constructor.

Method Detail

add

public void add(NamedCodePiece codePiece)
The parser adds a code piece here. The code pieces will be inserted in sorted order in the codePieces vector.

Parameters:
codePiece - A named code piece found in the code.

filter

public void filter(java.io.File source,
                   java.io.File destination,
                   java.lang.Object mNamespace)
            throws java.lang.Exception
Replace all the code pieces in a source file with new code from the model, or maintain them if nothing is found in the model.

Parameters:
source - The source file.
destination - The destination file.
mNamespace - The package the source belongs to.
Throws:
java.lang.Exception


ArgoUML © 1996-2004 (20040316)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook