Miranda methods and Methods added by Code Generators

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Aug 9 06:11:25 PDT 2010

> Your description of the current situation is not quite accurate. When 
> javac compiles the source of Child it is not at that time compiling 
> the source of Parent. It only has the bytecode of Parent available 
> (the generated SYNTHETIC method _only occurs_ in the bytecode). So, it 
> is possible for javac to end up finding SYNTHETIC methods in its 
> method tables which it has not itself introduced directly through 
> analysis of source code.
Are you suggesting that the check can erroneously fail in a scenario 
without AOP? If so, please post an example.
> What I don't understand is why you have to rely on just the SYNTHETIC 
> attribute to identify the cases which javac should discount. Looking 
> at ClassWriter.java it appears that bridge methods are written to the 
> classfile with the BRIDGE attribute. Similarly, Miranda methods are 
> written with the SYNTHETIC and ABSTRACT attribute. So, why 
> automatically discount SYNTHETIC methods? Could you not instead 
That's what I had in mind when I said that the check could be perceived 
as too strict.


More information about the compiler-dev mailing list