org.eclipse.jdt.internal.compiler.apt.util
Class EclipseFileManager

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.apt.util.EclipseFileManager
All Implemented Interfaces:
Closeable, Flushable, JavaFileManager, OptionChecker, StandardJavaFileManager

public class EclipseFileManager
extends Object
implements StandardJavaFileManager

Implementation of the Standard Java File Manager


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.tools.JavaFileManager
JavaFileManager.Location
 
Field Summary
 ResourceBundle bundle
           
 
Constructor Summary
EclipseFileManager(Locale locale, Charset charset)
           
 
Method Summary
protected  void addNewEntry(ArrayList paths, String currentClasspathName, ArrayList currentRuleSpecs, String customEncoding, String destPath, boolean isSourceOnly, boolean rejectDestinationPathOnJars)
           
 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)
           
 Iterable<? extends JavaFileObject> getJavaFileObjects(File... files)
           
 Iterable<? extends JavaFileObject> getJavaFileObjects(String... names)
           
 Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files)
           
 Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names)
           
 JavaFileObject.Kind getKind(File f)
           
 Iterable<? extends File> getLocation(JavaFileManager.Location location)
           
 boolean handleOption(String current, Iterator<String> remaining)
           
 boolean hasLocation(JavaFileManager.Location location)
           
 String inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
           
 boolean isSameFile(FileObject fileObject1, FileObject fileObject2)
           
 int isSupportedOption(String option)
           
 Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse)
           
 void processPathEntries(int defaultSize, ArrayList paths, String currentPath, String customEncoding, boolean isSourceOnly, boolean rejectDestinationPathOnJars)
           
 void setLocale(Locale locale)
           
 void setLocation(JavaFileManager.Location location, Iterable<? extends File> path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bundle

public ResourceBundle bundle
Constructor Detail

EclipseFileManager

public EclipseFileManager(Locale locale,
                          Charset charset)
Method Detail

close

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

getClassLoader

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

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

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

getJavaFileObjects

public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files)
Specified by:
getJavaFileObjects in interface StandardJavaFileManager

getJavaFileObjects

public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names)
Specified by:
getJavaFileObjects in interface StandardJavaFileManager

getJavaFileObjectsFromFiles

public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files)
Specified by:
getJavaFileObjectsFromFiles in interface StandardJavaFileManager

getJavaFileObjectsFromStrings

public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names)
Specified by:
getJavaFileObjectsFromStrings in interface StandardJavaFileManager

getKind

public JavaFileObject.Kind getKind(File f)

getLocation

public Iterable<? extends File> getLocation(JavaFileManager.Location location)
Specified by:
getLocation in interface StandardJavaFileManager

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

inferBinaryName

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

isSameFile

public boolean isSameFile(FileObject fileObject1,
                          FileObject fileObject2)
Specified by:
isSameFile in interface JavaFileManager
Specified by:
isSameFile in interface StandardJavaFileManager

isSupportedOption

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

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

setLocation

public void setLocation(JavaFileManager.Location location,
                        Iterable<? extends File> path)
                 throws IOException
Specified by:
setLocation in interface StandardJavaFileManager
Throws:
IOException

setLocale

public void setLocale(Locale locale)

processPathEntries

public void processPathEntries(int defaultSize,
                               ArrayList paths,
                               String currentPath,
                               String customEncoding,
                               boolean isSourceOnly,
                               boolean rejectDestinationPathOnJars)

addNewEntry

protected void addNewEntry(ArrayList paths,
                           String currentClasspathName,
                           ArrayList currentRuleSpecs,
                           String customEncoding,
                           String destPath,
                           boolean isSourceOnly,
                           boolean rejectDestinationPathOnJars)


Copyright © 2012. All Rights Reserved.