org.inb.util
Class MemoryFileManager
java.lang.Object
javax.tools.ForwardingJavaFileManager<JavaFileManager>
org.inb.util.MemoryFileManager
- All Implemented Interfaces:
- Closeable, Flushable, JavaFileManager, OptionChecker
public final class MemoryFileManager
- extends ForwardingJavaFileManager<JavaFileManager>
In-memory file manager to dynamically compile generated java classes
- Author:
- Dmitry Repchevsky
Method Summary |
void |
addJarFile(byte[] jar)
|
Map<String,byte[]> |
getCompiledClasses()
|
JavaFileObject |
getJavaFileForInput(JavaFileManager.Location location,
String className,
JavaFileObject.Kind kind)
|
JavaFileObject |
getJavaFileForOutput(JavaFileManager.Location location,
String name,
JavaFileObject.Kind kind,
FileObject originatingSource)
|
String |
inferBinaryName(JavaFileManager.Location location,
JavaFileObject file)
|
Iterable<JavaFileObject> |
list(JavaFileManager.Location location,
String packageName,
Set<JavaFileObject.Kind> kinds,
boolean recurse)
|
MemoryFileManager
public MemoryFileManager(JavaFileManager fileManager)
addJarFile
public void addJarFile(byte[] jar)
throws IOException
- Throws:
IOException
getCompiledClasses
public Map<String,byte[]> getCompiledClasses()
getJavaFileForInput
public JavaFileObject getJavaFileForInput(JavaFileManager.Location location,
String className,
JavaFileObject.Kind kind)
throws IOException
- Specified by:
getJavaFileForInput
in interface JavaFileManager
- Overrides:
getJavaFileForInput
in class ForwardingJavaFileManager<JavaFileManager>
- Throws:
IOException
list
public Iterable<JavaFileObject> list(JavaFileManager.Location location,
String packageName,
Set<JavaFileObject.Kind> kinds,
boolean recurse)
throws IOException
- Specified by:
list
in interface JavaFileManager
- Overrides:
list
in class ForwardingJavaFileManager<JavaFileManager>
- Throws:
IOException
inferBinaryName
public String inferBinaryName(JavaFileManager.Location location,
JavaFileObject file)
- Specified by:
inferBinaryName
in interface JavaFileManager
- Overrides:
inferBinaryName
in class ForwardingJavaFileManager<JavaFileManager>
getJavaFileForOutput
public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location,
String name,
JavaFileObject.Kind kind,
FileObject originatingSource)
throws UnsupportedOperationException
- Specified by:
getJavaFileForOutput
in interface JavaFileManager
- Overrides:
getJavaFileForOutput
in class ForwardingJavaFileManager<JavaFileManager>
- Throws:
UnsupportedOperationException
Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010