-
Enhancement
-
Resolution: Rejected
-
P4
-
None
-
6
-
generic
-
generic
Please provide a wrapping file manager, for example:
class WrappingJavaFileManager implements JavaFileManager {
/** all calls are forwarded to this file manager */
protected final JavaFileManager fileManager;
protected FileObject wrap(FileObject fo) { return fo; }
protected FileObject unwrap(FileObject fo) { return fo; }
public FileObject getFileForInput(JavaFileManager.Location location, String packageName, URI relativeName) {
return wrap(fileManager.getFileForInput(location, packageName, relativeName));
}
public String inferBinaryName(JavaFileManager.Location location, JavaFileObject file) {
return fileManager.inferBinaryName(location, unwrap(file));
}
...
}
class WrappingJavaFileManager implements JavaFileManager {
/** all calls are forwarded to this file manager */
protected final JavaFileManager fileManager;
protected FileObject wrap(FileObject fo) { return fo; }
protected FileObject unwrap(FileObject fo) { return fo; }
public FileObject getFileForInput(JavaFileManager.Location location, String packageName, URI relativeName) {
return wrap(fileManager.getFileForInput(location, packageName, relativeName));
}
public String inferBinaryName(JavaFileManager.Location location, JavaFileObject file) {
return fileManager.inferBinaryName(location, unwrap(file));
}
...
}
- relates to
-
JDK-6401906 JSR 199: rename Wrapper* to Forwarding*
- Resolved