This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.tools
interface StandardJavaFileManager

All Superinterfaces:
JavaFileManager, OptionChecker

public interface StandardJavaFileManager
extends 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):


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.tools.JavaFileManager
JavaFileManager.Location
   
Method Summary
 Iterable

          Gets file objects representing the given files.
 Iterable

          Gets file objects representing the given file names.
 Iterable

          Gets file objects representing the given files.
 Iterable

          Gets file objects representing the given file names.
 Iterable

          Gets the path associated with the given location.
 boolean

          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.
 void

          Associates the given path with the given location.
 
Methods inherited from class javax.tools.JavaFileManager
close, flush, getClassLoader, getFileForInput, getFileForOutput, getJavaFileForInput, getJavaFileForOutput, handleOption, hasLocation, inferBinaryName, isSameFile, list
 
Methods inherited from class javax.tools.OptionChecker
isSupportedOption
 

Method Detail

getJavaFileObjects

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))
 

Parameters:
files - an array of files
Returns:
a list of file objects

getJavaFileObjects

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))
 

Parameters:
names - a list of file names
Returns:
a list of file objects

getJavaFileObjectsFromFiles

public Iterable getJavaFileObjectsFromFiles(Iterable files)
Gets file objects representing the given files.

Parameters:
files - a list of files
Returns:
a list of file objects

getJavaFileObjectsFromStrings

public Iterable getJavaFileObjectsFromStrings(Iterable names)
Gets file objects representing the given file names.

Parameters:
names - a list of file names
Returns:
a list of file objects

getLocation

public Iterable getLocation(JavaFileManager.Location location)
Gets the path associated with the given location.

Parameters:
location - a location
Returns:
a list of files or {@code null} if this location has no associated path

isSameFile

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.

Parameters:
a - a file object
b - a file object
Returns:
true if the given file objects represent the same canonical file or zip file entry; false otherwise

setLocation

public void setLocation(JavaFileManager.Location location,
                        Iterable path)
                 throws IOException
Associates the given path with the given location. Any previous value will be discarded.

Parameters:
location - a location
path - a list of files, if {@code null} use the default path for this location
Throws:
IOException - if location is an output location and path does not represent an existing directory


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.