org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch
Class HookedJavaFileObject
java.lang.Object
javax.tools.ForwardingFileObject<F>
javax.tools.ForwardingJavaFileObject<javax.tools.JavaFileObject>
org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.HookedJavaFileObject
- All Implemented Interfaces:
- javax.tools.FileObject, javax.tools.JavaFileObject
public class HookedJavaFileObject
- extends javax.tools.ForwardingJavaFileObject<javax.tools.JavaFileObject>
A delegating JavaFileObject that hooks the close() methods of the Writer
or OutputStream objects that it produces, and notifies the annotation
dispatch manager when a new compilation unit is produced.
| Nested classes/interfaces inherited from interface javax.tools.JavaFileObject |
javax.tools.JavaFileObject.Kind |
|
Field Summary |
protected java.lang.String |
_fileName
The name of the file that is created; this is passed to the CompilationUnit constructor,
and ultimately to the java.io.File constructor, so it is a normal pathname, just like
what would be on the compiler command line. |
protected BatchFilerImpl |
_filer
The Filer implementation that we need to notify when a new file is created. |
| Fields inherited from class javax.tools.ForwardingFileObject |
fileObject |
| Methods inherited from class javax.tools.ForwardingJavaFileObject |
getAccessLevel, getKind, getNestingKind, isNameCompatible |
| Methods inherited from class javax.tools.ForwardingFileObject |
delete, getCharContent, getLastModified, getName, openInputStream, openReader, toUri |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.tools.FileObject |
delete, getCharContent, getLastModified, getName, openInputStream, openReader, toUri |
_filer
protected final BatchFilerImpl _filer
- The Filer implementation that we need to notify when a new file is created.
_fileName
protected final java.lang.String _fileName
- The name of the file that is created; this is passed to the CompilationUnit constructor,
and ultimately to the java.io.File constructor, so it is a normal pathname, just like
what would be on the compiler command line.
HookedJavaFileObject
public HookedJavaFileObject(javax.tools.JavaFileObject fileObject,
java.lang.String fileName,
java.lang.String typeName,
BatchFilerImpl filer)
openOutputStream
public java.io.OutputStream openOutputStream()
throws java.io.IOException
- Specified by:
openOutputStream in interface javax.tools.FileObject- Overrides:
openOutputStream in class javax.tools.ForwardingFileObject<javax.tools.JavaFileObject>
- Throws:
java.io.IOException
openWriter
public java.io.Writer openWriter()
throws java.io.IOException
- Specified by:
openWriter in interface javax.tools.FileObject- Overrides:
openWriter in class javax.tools.ForwardingFileObject<javax.tools.JavaFileObject>
- Throws:
java.io.IOException
closed
protected void closed()