Class HookedJavaFileObject
java.lang.Object
javax.tools.ForwardingFileObject<JavaFileObject>
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 JavaFileObject
JavaFileObject.Kind -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringThe 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 final BatchFilerImplThe Filer implementation that we need to notify when a new file is created.Fields inherited from class ForwardingFileObject
fileObject -
Constructor Summary
ConstructorsConstructorDescriptionHookedJavaFileObject(JavaFileObject fileObject, String fileName, String typeName, BatchFilerImpl filer, String module, String encoding) -
Method Summary
Methods inherited from class ForwardingJavaFileObject
getAccessLevel, getKind, getNestingKind, isNameCompatibleMethods inherited from class ForwardingFileObject
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, String module, String encoding)
-
-
Method Details
-
openOutputStream
- Specified by:
openOutputStreamin interfaceFileObject- Overrides:
openOutputStreamin classForwardingFileObject<JavaFileObject>- Throws:
IOException
-
openWriter
- Specified by:
openWriterin interfaceFileObject- Overrides:
openWriterin classForwardingFileObject<JavaFileObject>- Throws:
IOException
-
closed
protected void closed()
-