Home » openjdk-7 » javax » tools » [javadoc | source]
public interface: StandardJavaFileManager [javadoc | source]

All Implemented Interfaces:

File manager based on {@linkplain File java.io.File}. A common way to obtain an instance of this class is using {@linkplain JavaCompiler#getStandardFileManager getStandardFileManager}, for example:
  JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
  {@code DiagnosticCollector} diagnostics =
      new {@code DiagnosticCollector()};
  StandardJavaFileManager fm = compiler.getStandardFileManager(diagnostics, null, null);
This file manager creates file objects representing regular {@linkplain File files}, {@linkplain java.util.zip.ZipEntry zip file entries}, or entries in similar file system based containers. Any file object returned from a file manager implementing this interface must observe the following behavior: According to these rules, the following URIs, for example, are allowed: Whereas these are not (reason in parentheses):
Method from javax.tools.StandardJavaFileManager Summary:
getJavaFileObjects,   getJavaFileObjects,   getJavaFileObjectsFromFiles,   getJavaFileObjectsFromStrings,   getLocation,   isSameFile,   setLocation
Method from javax.tools.StandardJavaFileManager Detail:
 public Iterable<JavaFileObject> getJavaFileObjects(File files)
    Gets file objects representing the given files. Convenience method equivalent to:
        getJavaFileObjectsFromFiles({@linkplain java.util.Arrays#asList Arrays.asList}(files))
 public Iterable<JavaFileObject> getJavaFileObjects(String names)
    Gets file objects representing the given file names. Convenience method equivalent to:
        getJavaFileObjectsFromStrings({@linkplain java.util.Arrays#asList Arrays.asList}(names))
 public Iterable<JavaFileObject> getJavaFileObjectsFromFiles(Iterable<File> files)
    Gets file objects representing the given files.
 public Iterable<JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names)
    Gets file objects representing the given file names.
 public Iterable<File> getLocation(Location location)
    Gets the path associated with the given location.
 public boolean isSameFile(FileObject a,
    FileObject b)
    Compares two file objects and return true if they represent the same canonical file, zip file entry, or entry in any file system based container.
 public  void setLocation(Location location,
    Iterable<File> path) throws IOException
    Associates the given path with the given location. Any previous value will be discarded.