Proposal: #ReflectiveAccessToNonExportedTypes: `exports dynamic`

Jochen Theodorou blackdrag at gmx.org
Fri Jul 1 10:20:34 UTC 2016



On 01.07.2016 11:15, Rafael Winterhalter wrote:
[...]
> Finally, I do not believe the service loader API offers an adequate
> alternative to many use-cases of reflection (while it can perfectly
> substitute some of them).  Many state-of-the art libraries actually
> intentionally offer POJO approaches without requiring their users to create
> interfaces for any shared interaction. I do not think that a gentle push
> into a direction that contradicts most existing Java libraries would be a
> taken well by the people implementing this software and in the end, the
> module system will be as successful as its adoption. I rather see people
> finding new ways around restrictions to keep things simple (for themselves).

even in the cases the service API is a replacement, the usage of the 
library will change and a breaking change is forced.

> For all these reasons I do not think that it is a good idea to limit
> reflection to exported packages.

or people will start just exporting everything.

bye Jochen


More information about the jpms-spec-observers mailing list