Spurious "make" in Java bindings, and safej extensions
Kevin Reid <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
E-on-Java currently defines a Java class's (e.g. foo.Bar) statics object to have the FQN foo.makeBar. However, in Java there are occasionally classes which are made solely as repositories of static members; putting "make" on the name of these classes, as well as interfaces being imported for their static members, is silly. Examples: javax.swing.ScrollPaneConstants org.erights.e.elib.Ref (as far as the E user is concerned) java.lang.Math (and StrictMath) java.util.Collections I propose that there should be an option in the safej file controlling whether the class is available as foo.Bar, foo.bar, or foo.makeBar. (Note that the code support for lookup of classes under multiple names already exists as part of the transition from <import:foo.Bar> (currently deprecated) to <import:foo.makeBar>; this would simply be a condition to un-deprecate one of them.) Two other related points: - Has <import:foo.Bar> returning a StaticMaker been deprecated long enough that we can do the second stage of making <import:foo.Bar> returning the type object? - How about adding an option to safej to specify the class's sugar class, if any? -- Kevin Reid <http://homepage.mac.com/kpreid/>