Stuart> The current japi results show that the only non-minor error in the
Stuart> top-level javax.swing package against 1.2 is that the constructor of
Stuart> JEditorPaneAccessibleHypertextSupport

I love the description of this constructor in the online javadoc.

Stuart> Basically, JEPAHS is a protected non-static inner class of JEditorPane
Stuart> so the compiler translates the usual default no-argument constructor
Stuart> into a constructor that takes a JEditorPane argument[1]. However, it
Stuart> looks like javac makes that constructor public where gcj(?) is making
Stuart> it protected.

The rule is, a default constructor inherits the access of its class.
I.E., 'protected' is correct here.

So, we should just define our own public no-argument constructor here.

Stuart> [1] Which raises another japi question: Should Japi automatically
Stuart> remove these implicit arguments from nonstatic inner class
Stuart> constructors so that its output matches what you'd actually put in
Stuart> Java source? My gut feeling is yes, but I'm not sure exactly how to
Stuart> detect them...

Perhaps you can do it by noticing if the class has a synthetic
'this$0' field.  This is the usual name for an 'outer this'
reference, meaning that the class is not static.

Tom


_______________________________________________
Classpath mailing list
Classpath@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to