Module access question

Riaz A Aimandi Riaz.Aimandi at Sun.COM
Fri Apr 2 15:16:21 PDT 2010


Hi,

I have a quick question regarding modules.

Lets say I have a module that has both API & Implementation (in  
different packages)

Is it possible to restrict access from other modules to API only (both  
at compile & runtime) ?

i.e., disallow implementation classes to be directly accessed from  
other modules.

Example:
	Module foo:
	package foo.api.* : has API
	package foo.impl.* has Implementation

	I want to restrict direct access to foo.impl.* from any module that  
requires this module.

I understand that with multiple modules this could be easily done. But  
I am hoping that I do not have to breakup modules just for this purpose.

Thanks,

- riaz



More information about the jigsaw-dev mailing list