com.ochafik.lang.compiler
Class MemoryFileManager
java.lang.Object
javax.tools.ForwardingJavaFileManager<JavaFileManager>
com.ochafik.lang.compiler.MemoryFileManager
- All Implemented Interfaces:
- Closeable, Flushable, JavaFileManager, OptionChecker
public class MemoryFileManager
- extends ForwardingJavaFileManager<JavaFileManager>
Method Summary |
MemoryJavaFile |
addSourceInput(String path,
String content)
|
FileObject |
getFileForOutput(JavaFileManager.Location location,
String packageName,
String relativeName,
FileObject sibling)
|
static String |
getFullPathForClass(String className,
String extension)
|
JavaFileObject |
getJavaFileForInput(JavaFileManager.Location location,
String className,
JavaFileObject.Kind kind)
|
JavaFileObject |
getJavaFileForOutput(JavaFileManager.Location location,
String className,
JavaFileObject.Kind kind,
FileObject sibling)
|
Iterable<? extends JavaFileObject> |
getJavaFileObjects()
|
static String |
getSimplePathForClass(String className,
String extension)
|
boolean |
isSameFile(FileObject a,
FileObject b)
|
protected void |
writeEntry(String path,
FileObject o,
JarOutputStream jout)
|
void |
writeJar(File outputJar,
boolean outputSources,
Map<String,File> additionalFiles)
|
void |
writeJar(OutputStream out,
boolean outputSources,
Map<String,File> additionalFiles)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
inputs
public final Map<String,MemoryJavaFile> inputs
outputs
public final Map<String,FileObject> outputs
MemoryFileManager
public MemoryFileManager(JavaFileManager fm)
writeJar
public void writeJar(File outputJar,
boolean outputSources,
Map<String,File> additionalFiles)
throws IOException
- Throws:
IOException
writeJar
public void writeJar(OutputStream out,
boolean outputSources,
Map<String,File> additionalFiles)
throws IOException
- Throws:
IOException
writeEntry
protected void writeEntry(String path,
FileObject o,
JarOutputStream jout)
throws IOException
- Throws:
IOException
addSourceInput
public MemoryJavaFile addSourceInput(String path,
String content)
isSameFile
public boolean isSameFile(FileObject a,
FileObject b)
- Specified by:
isSameFile
in interface JavaFileManager
- Overrides:
isSameFile
in class ForwardingJavaFileManager<JavaFileManager>
getJavaFileObjects
public Iterable<? extends JavaFileObject> getJavaFileObjects()
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
getFullPathForClass
public static String getFullPathForClass(String className,
String extension)
getSimplePathForClass
public static String getSimplePathForClass(String className,
String extension)
getJavaFileForOutput
public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location,
String className,
JavaFileObject.Kind kind,
FileObject sibling)
throws IOException
- Specified by:
getJavaFileForOutput
in interface JavaFileManager
- Overrides:
getJavaFileForOutput
in class ForwardingJavaFileManager<JavaFileManager>
- Throws:
IOException
getFileForOutput
public FileObject getFileForOutput(JavaFileManager.Location location,
String packageName,
String relativeName,
FileObject sibling)
throws IOException
- Specified by:
getFileForOutput
in interface JavaFileManager
- Overrides:
getFileForOutput
in class ForwardingJavaFileManager<JavaFileManager>
- Throws:
IOException
Copyright © 2009. All Rights Reserved.