serialized annotations use sun.reflect.*
Mandy Chung
Mandy.Chung at Sun.COM
Wed Jan 13 16:04:53 PST 2010
Jon, Joe,
There should be no issue for jdk classes (such as javac/apt) to have a
dependency on sun.reflect.annotation.* classes and they're currently in
the base module.
At some point in time, we would make private API (e.g sun.*) only
accessible by jdk. There are two ways to do it:
(1) make the private API to be module-private; or
(2) include the private API as a separate private module that only
permits by the jdk.
There are private sun.* or com.sun.* APIs that applications might depend
on. One idea to support the legacy mode is to put these APIs in a
private-legacy module so that existing applications can continue to run.
If any sun.reflect.annotation.* become part of the public SE spec, we
would keep those classes in the base module and remain public then. As
the sun.* API is used in the serialized form, I don't know enough if
there is any other implication if they are made inaccessible other than
the jdk. I need to verify this case.
Mandy
On 01/11/10 18:36, Jonathan Gibbons wrote:
> Mandy, Alan,
>
> In the modularization effort, is it going to be an issue that javac (and
> apt) has an explicit dependence on sun.reflect.annotation.*? Since JDK
> 5, the serialized form of annotations has used these otherwise internal
> classes. This is true both for annotations created by the runtime, and
> by javac as part of JSR 269. For full details, if you really want to,
> see 6538914 and 6270734.
> Joe and I are trying to figure out the disposition of these bugs --
> whether to use new public classes (and break compatibility) or to accept
> the status quo that these classes should be part of the public J2SE spec.
>
> -- Jon
More information about the jigsaw-dev
mailing list