I’m currently working on modifying javac compiler to produce, in a certain way, our own Programming Language.
We want to get rid of Java’s default access modifier, making everything that has no access modifier as public.
But so far, I haven’t been successfull to find where in Java compilation code this is implemented. I could easily add into one of the declaration phases, but this is a poor solution that we wouldn’t like to have.
Any insight on this?
Looking at The
classFile Format, especially section 4.5 Fields and 4.6 Methods I see the following constants being defined:Since there is no
ACC_DEFAULTflag and the documentation says at most one (not exactly one) I would guess that having no flags at all means default access.