[e-lang] Spurious "make" in Java bindings, and safej extensions
Kevin Reid
kpreid at mac.com
Fri May 15 00:21:13 EDT 2009
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/>
More information about the e-lang
mailing list