org.stjs.generator.javac
Class CustomClassloaderJavaFileManager

java.lang.Object
  extended by org.stjs.generator.javac.CustomClassloaderJavaFileManager
All Implemented Interfaces:
Closeable, Flushable, JavaFileManager, OptionChecker

public class CustomClassloaderJavaFileManager
extends Object
implements JavaFileManager

Since:
15-Oct-2009
Author:
atamur

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.tools.JavaFileManager
JavaFileManager.Location
 
Constructor Summary
CustomClassloaderJavaFileManager(ClassLoader classLoader, StandardJavaFileManager standardFileManager)
           
 
Method Summary
 void close()
           
 void flush()
           
 ClassLoader getClassLoader(JavaFileManager.Location location)
           
 FileObject getFileForInput(JavaFileManager.Location location, String packageName, String relativeName)
           
 FileObject getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling)
           
 JavaFileObject getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind)
           
 JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling)
           
 boolean handleOption(String current, Iterator<String> remaining)
           
 boolean hasLocation(JavaFileManager.Location location)
           
 String inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
           
 boolean isSameFile(FileObject a, FileObject b)
           
 int isSupportedOption(String option)
           
 Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomClassloaderJavaFileManager

public CustomClassloaderJavaFileManager(ClassLoader classLoader,
                                        StandardJavaFileManager standardFileManager)
Method Detail

getClassLoader

public ClassLoader getClassLoader(JavaFileManager.Location location)
Specified by:
getClassLoader in interface JavaFileManager

inferBinaryName

public String inferBinaryName(JavaFileManager.Location location,
                              JavaFileObject file)
Specified by:
inferBinaryName in interface JavaFileManager

isSameFile

public boolean isSameFile(FileObject a,
                          FileObject b)
Specified by:
isSameFile in interface JavaFileManager

handleOption

public boolean handleOption(String current,
                            Iterator<String> remaining)
Specified by:
handleOption in interface JavaFileManager

hasLocation

public boolean hasLocation(JavaFileManager.Location location)
Specified by:
hasLocation in interface JavaFileManager

getJavaFileForInput

public JavaFileObject getJavaFileForInput(JavaFileManager.Location location,
                                          String className,
                                          JavaFileObject.Kind kind)
                                   throws IOException
Specified by:
getJavaFileForInput in interface JavaFileManager
Throws:
IOException

getJavaFileForOutput

public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location,
                                           String className,
                                           JavaFileObject.Kind kind,
                                           FileObject sibling)
                                    throws IOException
Specified by:
getJavaFileForOutput in interface JavaFileManager
Throws:
IOException

getFileForInput

public FileObject getFileForInput(JavaFileManager.Location location,
                                  String packageName,
                                  String relativeName)
                           throws IOException
Specified by:
getFileForInput in interface JavaFileManager
Throws:
IOException

getFileForOutput

public FileObject getFileForOutput(JavaFileManager.Location location,
                                   String packageName,
                                   String relativeName,
                                   FileObject sibling)
                            throws IOException
Specified by:
getFileForOutput in interface JavaFileManager
Throws:
IOException

flush

public void flush()
           throws IOException
Specified by:
flush in interface Flushable
Specified by:
flush in interface JavaFileManager
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in interface 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
Throws:
IOException

isSupportedOption

public int isSupportedOption(String option)
Specified by:
isSupportedOption in interface OptionChecker


Copyright © 2014. All Rights Reserved.