/**
* Determines if this is an output location. An output
* location is a location that is conventionally used for
* output.
*
* @return true if this is an output location, false otherwise
*/
boolean isOutputLocation();
}
/**
* Gets a class loader for loading plug-ins from the given
* location. For example, to load annotation processors, a
* compiler will request a class loader for the {@link
* StandardLocation#ANNOTATION_PROCESSOR_PATH
* ANNOTATION_PROCESSOR_PATH} location.
*
* @param location a location
* @return a class loader for the given location; or {@code null}
* if loading plug-ins from the given location is disabled or if
* the location is not known
* @throws SecurityException if a class loader can not be created
* in the current security context
* @throws IllegalStateException if {@link #close} has been called
* and this file manager cannot be reopened
*/
ClassLoader getClassLoader(Location location);
/**
* Lists all file objects matching the given criteria in the given
* location. List file objects in "subpackages" if recurse is
* true.
*
* <p>Note: even if the given location is unknown to this file
* manager, it may not return {@code null}. Also, an unknown
* location may not cause an exception.
*
* @param location a location
* @param packageName a package name
* @param kinds return objects only of these kinds
* @param recurse if true include "subpackages"
* @return an Iterable of file objects matching the given criteria
* @throws IOException if an I/O error occurred, or if {@link
* #close} has been called and this file manager cannot be
* reopened
* @throws IllegalStateException if {@link #close} has been called
* and this file manager cannot be reopened
*/
Iterable<JavaFileObject> list(Location location,
String packageName,
Set<Kind> kinds,
boolean recurse)
throws IOException;
/**
* Infers a binary name of a file object based on a location. The
* binary name returned might not be a valid JLS binary name.
*
* @param location a location
* @param file a file object
* @return a binary name or {@code null} the file object is not
* found in the given location
* @throws IllegalStateException if {@link #close} has been called
* and this file manager cannot be reopened
*/
String inferBinaryName(Location location, JavaFileObject file);
/**
* Compares two file objects and return true if they represent the
* same underlying object.
*
* @param a a file object
* @param b a file object
* @return true if the given file objects represent the same
* underlying object
*
* @throws IllegalArgumentException if either of the arguments
* were created with another file manager and this file manager
* does not support foreign file objects
*/
boolean isSameFile(FileObject a, FileObject b);
/**
* Handles one option. If {@code current} is an option to this
* file manager it will consume any arguments to that option from
* {@code remaining} and return true, otherwise return false.
*
* @param current current option
* @param remaining remaining options
* @return true if this option was handled by this file manager,
* false otherwise
* @throws IllegalArgumentException if this option to this file
* manager is used incorrectly
* @throws IllegalStateException if {@link #close} has been called
* and this file manager cannot be reopened
*/
boolean handleOption(String current, Iterator<String> remaining);
/**
=2= |