Java News from Friday, November 30, 2007

Sun has have posted the early draft review specification of JSR-294 Improved Modularity Support in the JavaTM Programming Language . This spec introduces superpackages into Java.

PROGRAMS are organized as sets of packages and superpackages. Each package has its own set of names for types, which helps to prevent name conflicts. Each superpackage is a collection of one or more packages or superpackages, which helps to organize large programs consisting of many packages. Related packages that are grouped into a superpackage can access each others’ public types, while unrelated packages outside the superpackage cannot access those types, unless the types are exported.

The naming structure for packages and superpackages is hierarchical (§7.1). The members of a package are class and interface types (§7.6), which are declared in compilation units of the package, and subpackages, which may contain compilation units and subpackages of their own. The members of a superpackage are the types declared in packages and superpackages listed in the supercompilation unit of the superpackage.

Comments are due by December 20.