au.gov.tas.dpiwe.mr.tool
Class EntitySourceFileRewriter
java.lang.Object
java.io.Reader
java.io.BufferedReader
au.gov.tas.dpiwe.mr.tool.EntitySourceFileScanner
au.gov.tas.dpiwe.mr.tool.EntitySourceFileRewriter
- All Implemented Interfaces:
- Closeable, Readable
public class EntitySourceFileRewriter
- extends EntitySourceFileScanner
EntitySourceFileRewriter is currently a very primitive Java/Groovy source file
rewriter which can be used to comment out import lines of the form:
import <subpackage of business object package> .
<EJB bean type> as <EJB interface name>;
- Since:
- Mr Architecture 1.0
- Version:
- 1.0.1.0
- Author:
- Kade Hansson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntitySourceFileRewriter
public EntitySourceFileRewriter(Reader reader)
throws IOException
- Creates a new entity source file rewriter.
- Parameters:
reader - the reader from which the source file is waiting to be read.
- Throws:
IOException - if the reader cannot be suitably buffered.
EntitySourceFileRewriter
public EntitySourceFileRewriter(Reader reader,
Messenger messenger)
throws IOException
- Creates a new entity source file rewriter with logging enabled.
- Parameters:
reader - the reader from which the source file is waiting to be read.messenger - the messenger to log to.
- Throws:
IOException - if the reader cannot be suitably buffered.
rewriteEntitySourceFile
public boolean rewriteEntitySourceFile(PrintWriter copy,
String businessPackageBase)
throws IOException
- Copies the file, except for matching import clauses.
- Parameters:
copy - the stream to copy the file's actual contents to.
- Throws:
IOException - if the input file could not be read.