This kind of usage is uncommon anywhere. Maybe ,static import pollutes the namesapce, but users are more used to this (because the language recommends this). The reason for introducing static import was to avoid this kind of clever tricks. If you are using any modern IDE , it tells you whether is is static or where it belongs to.
may be we should not do a import static foo.Foo.* we can do import static foo.Foo.a; import static foo.Foo.b; we must import only those methods we wish to use (to minimize pollution). On Tue, Jul 22, 2008 at 11:46 PM, Chris Hostetter <[EMAIL PROTECTED]> wrote: > > : instead of using > : > : import static org.apache.solr.util.SolrPluginUtils.*; > : > : there is an inner class as follows > > that was intentional ... i'm not a fan of import static in cases like this > (Utility classes with *lots* of static methods). it pollutes the > namespace of the current class and makes it hard for people reading the > code doing the importing to realize which method calls are static and > come from another utility class. > > When people see U.foo(bar) it should be obvious that's a static method > comming from some Utility class U ... we've just "aliased" U to > SolrPluginUtils -- and it's easy to see that using any IDE with > knowledge of the class hierarchy (or in my case: "grep"). > > > -Hoss > > -- --Noble Paul