org.eclipse.jdt.internal.compiler.apt.dispatch
Class HookedJavaFileObject
java.lang.Object
javax.tools.ForwardingFileObject<F>
javax.tools.ForwardingJavaFileObject<JavaFileObject>
org.eclipse.jdt.internal.compiler.apt.dispatch.HookedJavaFileObject
- All Implemented Interfaces:
- FileObject, JavaFileObject
public class HookedJavaFileObject
- extends ForwardingJavaFileObject<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.
Field Summary |
protected 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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_filer
protected final BatchFilerImpl _filer
- The Filer implementation that we need to notify when a new file is created.
_fileName
protected final 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(JavaFileObject fileObject,
String fileName,
BatchFilerImpl filer)
openOutputStream
public OutputStream openOutputStream()
throws IOException
- Specified by:
openOutputStream
in interface FileObject
- Overrides:
openOutputStream
in class ForwardingFileObject<JavaFileObject>
- Throws:
IOException
openWriter
public Writer openWriter()
throws IOException
- Specified by:
openWriter
in interface FileObject
- Overrides:
openWriter
in class ForwardingFileObject<JavaFileObject>
- Throws:
IOException
closed
protected void closed()
Copyright © 2012. All Rights Reserved.