Small question about Dependence.Modifier.SYNTHETIC
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Feb 6 09:40:17 PST 2012
There are two flags, ACC_SYNTHETIC and ACC_SYNTHESIZED. According to
the latest spec, you should be getting ACC_SYNTHESIZED. But, that
change may not have made it to the main repos yet.
-- Jon
On 02/06/2012 09:27 AM, Alexey Fedorov wrote:
> Hello!
>
> I am playing with Jigsaw and met the following strange behavior. As I
> understand, java.lang.module.Dependence.Modifier.SYNTHETIC was created
> in modular JDK for underlining that the corresponding dependency was
> added by the system, not by user. Consider the following code example:
>
>
> /module-info.java:/
>
> module my.module @ 1.0 {
> class mypackage.MyClass;
> }
>
>
> /MyClass.java:/
>
> package mypackage;
>
> public class MyClass {
>
> public static void main(String[] args) throws IOException {
> ModuleInfo moduleInfo =
> MyClass.class.getModule().getModuleInfo();
> for (ViewDependence viewDependence :
> moduleInfo.requiresModules()) {
> System.out.println(viewDependence);
> }
> }
>
> }
>
>
> In the middle of January output was:
>
>>> requires*synthetic*jdk@=8-ea
>
>
> But actual output is:
>
>>> requires jdk@=8-ea
>
>
>
> Here dependency "jdk@=8-ea" is not marked as*synthetic*. Is it an
> expected behavior or regression?
>
>
> --
> Thank you,
> Alexey
>
More information about the jigsaw-dev
mailing list