JSRs: Java Specification Requests
JSR 201: Extending the JavaTM Programming Language with Enumerations, Autoboxing, Enhanced for loops and Static Import
JCP version in use: 2.6
Java Specification Participation Agreement version in use: 2.0
This JSR proposes four new JavaTM programming language features: enumerations, autoboxing, enhanced for loops and static import.
Please direct comments on this JSR to the Spec Lead(s)
Note that the following information has been updated from the original.
Maintenance Lead: Alex Buckley
Section 1. Identification
Submitting Member: Sun Microsystems
Name of Contact Person:
Note that this information has been updated from this original proposal.
Initial Expert Group Membership:
Supporting this JSR:
Section 2: Request
2.1 Please describe the proposed Specification:
The proposal extends the Java programming language in four specific
2.2 What is the target Java platform? (i.e., desktop, server, personal, embedded, card, etc.)
All versions of the Java platform
2.3 What need of the Java community will be addressed by the proposed specification?
One of the themes of the Java 2 Standard Edition (J2SETM) "Tiger" release is "Ease of Development". To this end, the Java programming language design team at Sun has been evaluating a wide variety of language proposals.
The Java programming language has been of great benefit to developers in simplifying the construction of large, robust, maintainable programs. It has achieved this by a careful balancing of simplicity and power. Programs are both easy to write and (more importantly) they are easy to read. We have therefore approached the task of updating the Java programming language with considerable trepidation. The existing spirit and features of the language are used by a very large developer community and we wish to avoid disrupting or annoying existing users.
However after careful study, we believe that certain language updates will be non-disruptive and will be widely useful to developers, by improving the overall "Ease of Development" of the Java platform. Three of these changes are already being reviewed through other JSRs:
This JSR proposes four smaller language changes that we believe are appropriate for "Tiger". To avoid an excess of small JSRs, it seems appropriate to group these changes into a single JSR.
2.4 Why isn't this need met by existing specifications?
These are language extensions
2.5 Please give a short description of the underlying technology or technologies:
The proposed extensions are all easily implemented by modifications to the source-to-bytecode compiler. No changes to the Java Virtual Machine Specification are required.
2.6 Is there a proposed package name for the API Specification? (i.e., javapi.something, org.something, etc.)
2.7 Does the proposed specification have any dependencies on specific operating systems, CPUs, or I/O devices that you know of?
2.8 Are there any security issues that cannot be addressed by the current security model?
2.9 Are there any internationalization or localization issues?
2.10 Are there any existing specifications that might be rendered obsolete, deprecated, or in need of revision as a result of this work?
The Java Language Specification will require revision
2.11 Please describe the anticipated schedule for the development of this specification.
The JSRs should be concluded by September 1, 2003.
2.12 Please describe the anticipated working model for the Expert Group working on developing this specification.
Experts representing programmers, compiler/IDE vendors and programming language specialists will participate. The specific proposals attached to this JSR will form the starting point for the design. The expert group shall endeavor to work out the exact details of the proposals for inclusion in the 3rd edition of the Java Language Specification. E-mail will be the primary form of communication.
2.13 Please describe how the RI and TCK will de delivered, i.e. as part of a profile or platform edition, or stand-alone, or both. Include version information for the profile or platform in your answer.
This JSR will be delivered as part of the Java Language Specification and J2SE Release 1.5 ("Tiger").
2.14 Please state the rationale if previous versions are available stand-alone and you are now proposing in 2.13 to only deliver RI and TCK as part of a profile or platform edition (See sections 1.1.5 and 1.1.6 of the JCP 2 document).
2.15 Please provide a description of the business terms for the Specification, RI and TCK that will apply when this JSR is final.
This JSR will be delivered as part of J2SE 1.5 "Tiger". The proposed J2SE 1.5 licensing terms are available at J2SE 1.5 licensing terms.
Section 3: Contributions
3.1 Please list any existing documents, specifications, or implementations that describe the technology. Please include links to the documents if they are publicly available.
3.2 Explanation of how these items might be used as a starting point for the work.
The proposals provide an initial specification of the desired features. They need to be refined into