Method from com.sun.tools.javac.file.CacheFSInfo Detail: |
public void clearCache() {
cache.clear();
}
|
public boolean exists(File file) {
Entry e = getEntry(file);
return e.exists;
}
|
public File getCanonicalFile(File file) {
Entry e = getEntry(file);
return e.canonicalFile;
}
|
public List<File> getJarClassPath(File file) throws IOException {
// don't bother to lock the cache, because it is thread-safe, and
// because the worst that can happen would be to create two identical
// jar class paths together and have one overwrite the other.
Entry e = getEntry(file);
if (e.jarClassPath == null)
e.jarClassPath = super.getJarClassPath(file);
return e.jarClassPath;
}
|
public boolean isDirectory(File file) {
Entry e = getEntry(file);
return e.isDirectory;
}
|
public boolean isFile(File file) {
Entry e = getEntry(file);
return e.isFile;
}
|
public static void preRegister(Context context) {
context.put(FSInfo.class, new Context.Factory< FSInfo >() {
public FSInfo make(Context c) {
FSInfo instance = new CacheFSInfo();
c.put(FSInfo.class, instance);
return instance;
}
});
}
Register a Context.Factory to create a CacheFSInfo. |