org.argouml.language.java.generator
Class CodePieceCollector
java.lang.Object
org.argouml.language.java.generator.CodePieceCollector
- public class CodePieceCollector
- extends Object
This class collects pieces of code when a source file is parsed,
and then updates the file with new code from the model.
taken from:
JavaRE - Code generation and reverse engineering for UML and Java.
|
Method Summary |
void |
add(NamedCodePiece codePiece)
The parser adds a code piece here. |
void |
filter(File source,
File destination,
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 |
codePieces
private Vector codePieces
- Code pieces the parser found.
CodePieceCollector
public CodePieceCollector()
- Constructor.
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(File source,
File destination,
Object mNamespace)
throws IOException
- 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:
IOException - if we cannot write or read from the files.