public class JavacFileManager extends BaseFileManager implements StandardJavaFileManager
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Modifier and Type | Class and Description |
|---|---|
static interface |
JavacFileManager.Archive
An archive provides a flat directory structure of a ZipFile by
mapping directory names to lists of files (basenames).
|
class |
JavacFileManager.MissingArchive |
protected static class |
JavacFileManager.SortFiles |
BaseFileManager.ContentCacheEntryStandardJavaFileManager.PathFactoryJavaFileManager.Location| Modifier and Type | Field and Description |
|---|---|
protected boolean |
mmappedIO |
protected JavacFileManager.SortFiles |
sortFiles |
protected boolean |
symbolFileEnabled |
charset, classLoaderClass, contentCache, locations, log, options| Constructor and Description |
|---|
JavacFileManager(Context context,
boolean register,
Charset charset)
Create a JavacFileManager using a given context, optionally registering
it as the JavaFileManager for that context.
|
cache, createLocations, decode, flushCache, getCachedContent, getClassLoader, getDecoder, getEncodingName, getKind, getSource, handleOption, isSupportedOption, makeByteBuffer, nullCheck, nullCheck, recycleByteBufferclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasPath, getJavaFileObjects, getJavaFileObjectsFromPaths, getLocationAsPaths, setLocationForModule, setLocationFromPaths, setPathFactorycontains, getLocationForModule, getLocationForModule, getServiceLoader, handleOption, inferModuleName, listLocationsForModulesisSupportedOptionprotected boolean mmappedIO
protected boolean symbolFileEnabled
protected JavacFileManager.SortFiles sortFiles
public static char[] toArray(CharBuffer buffer)
public static void preRegister(Context context)
public void setContext(Context context)
setContext in class BaseFileManagerpublic void setSymbolFileEnabled(boolean b)
public boolean isDefaultBootClassPath()
isDefaultBootClassPath in class BaseFileManagerpublic JavaFileObject getFileForInput(String name)
public JavaFileObject getRegularFile(File file)
public JavaFileObject getFileForOutput(String classname, JavaFileObject.Kind kind, JavaFileObject sibling) throws IOException
IOExceptionpublic Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names)
getJavaFileObjectsFromStrings in interface StandardJavaFileManagerpublic Iterable<? extends JavaFileObject> getJavaFileObjects(String... names)
getJavaFileObjects in interface StandardJavaFileManagerpublic static void testName(String name, boolean isValidPackageName, boolean isValidClassName)
protected JavacFileManager.Archive openArchive(File zipFilename) throws IOException
IOExceptionpublic void flush()
flush in interface Flushableflush in interface JavaFileManagerpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface JavaFileManagerpublic ClassLoader getClassLoader(JavaFileManager.Location location)
getClassLoader in interface JavaFileManagerpublic Iterable<JavaFileObject> list(JavaFileManager.Location location, String packageName, Set<JavaFileObject.Kind> kinds, boolean recurse) throws IOException
list in interface JavaFileManagerIOExceptionpublic String inferBinaryName(JavaFileManager.Location location, JavaFileObject file)
inferBinaryName in interface JavaFileManagerpublic boolean isSameFile(FileObject a, FileObject b)
isSameFile in interface JavaFileManagerisSameFile in interface StandardJavaFileManagerpublic boolean hasLocation(JavaFileManager.Location location)
hasLocation in interface JavaFileManagerpublic JavaFileObject getJavaFileForInput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind) throws IOException
getJavaFileForInput in interface JavaFileManagerIOExceptionpublic FileObject getFileForInput(JavaFileManager.Location location, String packageName, String relativeName) throws IOException
getFileForInput in interface JavaFileManagerIOExceptionpublic JavaFileObject getJavaFileForOutput(JavaFileManager.Location location, String className, JavaFileObject.Kind kind, FileObject sibling) throws IOException
getJavaFileForOutput in interface JavaFileManagerIOExceptionpublic FileObject getFileForOutput(JavaFileManager.Location location, String packageName, String relativeName, FileObject sibling) throws IOException
getFileForOutput in interface JavaFileManagerIOExceptionpublic Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files)
getJavaFileObjectsFromFiles in interface StandardJavaFileManagerpublic Iterable<? extends JavaFileObject> getJavaFileObjects(File... files)
getJavaFileObjects in interface StandardJavaFileManagerpublic void setLocation(JavaFileManager.Location location, Iterable<? extends File> path) throws IOException
setLocation in interface StandardJavaFileManagerIOExceptionpublic Iterable<? extends File> getLocation(JavaFileManager.Location location)
getLocation in interface StandardJavaFileManagerprotected static boolean isRelativeUri(URI uri)
protected static boolean isRelativeUri(String u)
public static String getRelativeName(File file)
file - a relative file nameIllegalArgumentException - if the file name is not
relative according to the definition given in JavaFileManager.getFileForInput(javax.tools.JavaFileManager.Location, java.lang.String, java.lang.String)public static String getMessage(IOException e)
e - an IOExceptionCopyright © 2017 earcam. All rights reserved.