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

All Implemented Interfaces:
    JavaFileManager

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 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 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 getJavaFileObjectsFromFiles(Iterable files)
    Gets file objects representing the given files.
 public Iterable getJavaFileObjectsFromStrings(Iterable names)
    Gets file objects representing the given file names.
 public Iterable 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 path) throws IOException
    Associates the given path with the given location. Any previous value will be discarded.