(reflect) Accessing members of inner annotations types

Joel Borggren-Franck joel.franck at oracle.com
Wed Jan 8 13:26:57 UTC 2014

On 2014-01-08, Peter Levart wrote:
> On 01/08/2014 01:00 PM, Joel Borggren-Franck wrote:
> >>
> >Perhaps an alternative would be to check if the interface a proxy is
> >proxying is nested. In that case use the outermost interface's access
> >level for the package calculation.
> >
> >This would probably lead to a few more proxies being generated into the
> >"real" package compared to your proposal. I don't know if that is ok or
> >not.

> The nested public interface need not be referencing the outer
> class/interface. In this case, proxy class can be generated in
> com.sun.proxy.

Yes, this is the reason for my remark about more proxies being generated
into the real package. I'm not sure this is a problem, however it is
moot considering you second point.

> More importantly, even if the outer interface/class
> was public, the nested interface could be referencing some other
> package-private type. For example:

Ugh. Acknowledged. (This feels like a really bad practice but that
doesn't matter here.)


More information about the core-libs-dev mailing list