-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b85
-
generic
-
generic
###@###.### writes:
I've tried to update [a product] to the current version of JSR 199 and
I need to update our JavaFileManagers to the new interface. I have the
following questions:
1) I've do not understand why the JavaFileManager.getFileForInput (...)
and getFileForOutput () take the URI as a relativeName. It is not very
common to use the non absolute URIs. Why the relativeName isn't simply
a String?
2) How the StandardJavaFileManager.getJavaFileObjectsFromFiles () and
the StandardJavaFileManager.getJavaFileObjectsFromStrings () should work
when the files/paths are not under the roots managed by the FileManager.
It is acceptable to throw an exception?
3) I've looked into the ClassReader and it seems that it uses only the
StandardLocation.CLASS_PATH. How the classes from
StandardLocation.PLATFORM_CLASS_PATH are completed? Should I add the
roots from StandardLocation.PLATFORM_CLASS_PATH also under the roots of
StandardLocation.CLASS_PATH?
4) JavaCompilerTool.getTask (...) takes a FileManager as an argument,
but this JavaFileManager requires a knowledge of
StandardJavaFileManager.StandardLocation class since ClassReader passes
a StandardLocation.CLASS_PATH to the implementation of the JavaFileManager.
Why the StandardLocations are not defined in the JavaFileManager?
I've tried to update [a product] to the current version of JSR 199 and
I need to update our JavaFileManagers to the new interface. I have the
following questions:
1) I've do not understand why the JavaFileManager.getFileForInput (...)
and getFileForOutput () take the URI as a relativeName. It is not very
common to use the non absolute URIs. Why the relativeName isn't simply
a String?
2) How the StandardJavaFileManager.getJavaFileObjectsFromFiles () and
the StandardJavaFileManager.getJavaFileObjectsFromStrings () should work
when the files/paths are not under the roots managed by the FileManager.
It is acceptable to throw an exception?
3) I've looked into the ClassReader and it seems that it uses only the
StandardLocation.CLASS_PATH. How the classes from
StandardLocation.PLATFORM_CLASS_PATH are completed? Should I add the
roots from StandardLocation.PLATFORM_CLASS_PATH also under the roots of
StandardLocation.CLASS_PATH?
4) JavaCompilerTool.getTask (...) takes a FileManager as an argument,
but this JavaFileManager requires a knowledge of
StandardJavaFileManager.StandardLocation class since ClassReader passes
a StandardLocation.CLASS_PATH to the implementation of the JavaFileManager.
Why the StandardLocations are not defined in the JavaFileManager?
- relates to
-
JDK-6440528 javac deposits package-info.class in bogus directory
-
- Closed
-
-
JDK-6409829 JSR 199: enforce the use of valid package and class names in get{Java,}FileFor{Input,Output}
-
- Closed
-
-
JDK-6429194 javax.tools.StandardJavaFileManager.setLocation(CLASS_PATH) has no effect?
-
- Closed
-