Summary
-------
Enhance the Java language with a new types of imports - an import that can import all exported packages from a module. The main goal is to aid beginner programers.
Problem
-------
In order to write a simple program, beginner programmers must often import classes from multiple packages - like `java.io` and `java.util`. This is distracting them from their goal at hand, and creates obstacles in learning Java.
Solution
--------
We propose that a new type of imports is added to the Java language. This new import would import all the packages exported from a given module.
For example:
import module M;
Should import all packages exported to the current module from `M` and its transitive dependencies as if they were imported using the type-on-demand imports for the respective packages.
Some relevant adjustments to the Trees API and JShell API are needed as well.
Specification
-------------
The draft JLS changes is attached as a pdf.
The draft specdiff for the API changes is attached as specdiff.preliminary.00.zip, and also available for convenience here:
https://cr.openjdk.org/~jlahoda/8328481/specdiff.preliminary.00/overview-summary.html
This is a preview language feature.
Both these drafts are subject of change until the CSR is finalized.