Version: 1.1.1

org.inb.util
Class MemoryFileManager

java.lang.Object
  extended by javax.tools.ForwardingJavaFileManager<JavaFileManager>
      extended by 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

Nested Class Summary
static class MemoryFileManager.JavaSourceFromString
           
 
Nested classes/interfaces inherited from interface javax.tools.JavaFileManager
JavaFileManager.Location
 
Constructor Summary
MemoryFileManager(JavaFileManager fileManager)
           
 
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)
           
 
Methods inherited from class javax.tools.ForwardingJavaFileManager
close, flush, getClassLoader, getFileForInput, getFileForOutput, handleOption, hasLocation, isSameFile, isSupportedOption
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryFileManager

public MemoryFileManager(JavaFileManager fileManager)
Method Detail

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

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010