Class MyJavaFileManager
java.lang.Object
net.openhft.compiler.MyJavaFileManager
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, JavaFileManager, OptionChecker
-
Nested Class Summary
Nested classes/interfaces inherited from interface JavaFileManager
JavaFileManager.Location -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String, CloseableByteArrayOutputStream> private final StandardJavaFileManagerprivate static final org.slf4j.Loggerprivate static final longprivate static final sun.misc.Unsafe -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()voidflush()getClassLoader(JavaFileManager.Location location) getFileForInput(JavaFileManager.Location location, String packageName, String relativeName) getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling) getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind) @NotNull JavaFileObjectgetJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling) booleanhandleOption(String current, Iterator<String> remaining) booleanhasLocation(JavaFileManager.Location location) inferBinaryName(JavaFileManager.Location location, JavaFileObject file) inferModuleName(JavaFileManager.Location location) private <T> TinvokeNamedMethodIfAvailable(JavaFileManager.Location location, String name) booleanisSameFile(FileObject a, FileObject b) intisSupportedOption(String option) list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JavaFileManager
contains, getLocationForModule, getLocationForModule, getServiceLoader
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
unsafe
private static final sun.misc.Unsafe unsafe -
OVERRIDE_OFFSET
private static final long OVERRIDE_OFFSET -
fileManager
-
buffers
-
-
Constructor Details
-
MyJavaFileManager
MyJavaFileManager(StandardJavaFileManager fileManager)
-
-
Method Details
-
listLocationsForModules
public Iterable<Set<JavaFileManager.Location>> listLocationsForModules(JavaFileManager.Location location) - Specified by:
listLocationsForModulesin interfaceJavaFileManager
-
inferModuleName
- Specified by:
inferModuleNamein interfaceJavaFileManager
-
getClassLoader
- Specified by:
getClassLoaderin interfaceJavaFileManager
-
list
public Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException - Specified by:
listin interfaceJavaFileManager- Throws:
IOException
-
inferBinaryName
- Specified by:
inferBinaryNamein interfaceJavaFileManager
-
isSameFile
- Specified by:
isSameFilein interfaceJavaFileManager
-
handleOption
- Specified by:
handleOptionin interfaceJavaFileManager
-
hasLocation
- Specified by:
hasLocationin interfaceJavaFileManager
-
getJavaFileForInput
public JavaFileObject getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind) throws IOException - Specified by:
getJavaFileForInputin interfaceJavaFileManager- Throws:
IOException
-
getJavaFileForOutput
@NotNull public @NotNull JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling) - Specified by:
getJavaFileForOutputin interfaceJavaFileManager
-
getFileForInput
public FileObject getFileForInput(JavaFileManager.Location location, String packageName, String relativeName) throws IOException - Specified by:
getFileForInputin interfaceJavaFileManager- Throws:
IOException
-
getFileForOutput
public FileObject getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling) throws IOException - Specified by:
getFileForOutputin interfaceJavaFileManager- Throws:
IOException
-
flush
public void flush()- Specified by:
flushin interfaceFlushable- Specified by:
flushin interfaceJavaFileManager
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceJavaFileManager- Throws:
IOException
-
isSupportedOption
- Specified by:
isSupportedOptionin interfaceOptionChecker
-
clearBuffers
public void clearBuffers() -
getAllBuffers
-
invokeNamedMethodIfAvailable
-