Class HookedJavaFileObject
java.lang.Object
javax.tools.ForwardingFileObject<F>
javax.tools.ForwardingJavaFileObject<JavaFileObject>
org.aspectj.org.eclipse.jdt.internal.compiler.apt.dispatch.HookedJavaFileObject
- All Implemented Interfaces:
FileObject
,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 Class Summary
Nested classes/interfaces inherited from interface javax.tools.JavaFileObject
JavaFileObject.Kind
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
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
The Filer implementation that we need to notify when a new file is created.Fields inherited from class javax.tools.ForwardingFileObject
fileObject
-
Constructor Summary
ConstructorDescriptionHookedJavaFileObject(JavaFileObject fileObject, String fileName, String typeName, BatchFilerImpl filer)
-
Method Summary
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
-
Field Details
-
_filer
The Filer implementation that we need to notify when a new file is created. -
_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.
-
-
Constructor Details
-
HookedJavaFileObject
public HookedJavaFileObject(JavaFileObject fileObject, String fileName, String typeName, BatchFilerImpl filer)
-
-
Method Details
-
openOutputStream
- Specified by:
openOutputStream
in interfaceFileObject
- Overrides:
openOutputStream
in classForwardingFileObject<JavaFileObject>
- Throws:
IOException
-
openWriter
- Specified by:
openWriter
in interfaceFileObject
- Overrides:
openWriter
in classForwardingFileObject<JavaFileObject>
- Throws:
IOException
-
closed
protected void closed()
-