Find JSRs
Submit this Search

Ad Banner

JSRs: Java Specification Requests
JSR 201: Extending the JavaTM Programming Language with Enumerations, Autoboxing, Enhanced for loops and Static Import

Updates to Original JSR

Note that the following information has been updated from the original.


Maintenance Lead: Alex Buckley
E-Mail Address:
Telephone Number: +1 408 276 3065


Maintenance Lead: Danny Coward

E-Mail Address:

Telephone Number: +1 408 276 7049

Fax Number: +1 408 276 7700

Original Java Specification Request (JSR)

Identification | Request | Contributions

Section 1. Identification

Submitting Member: Sun Microsystems

Name of Contact Person: Gilad Bracha, Joshua Bloch

E-Mail Address:,

Telephone Number: +1 408 276 7025, +1 408 276 7022

Fax Number: +1 408 276 7700

Specification Lead: Gilad Bracha, Joshua Bloch

E-Mail Address:,

Telephone Number: +1 408 276 7025, +1 408 276 7022

Fax Number: +1 408 276 7700

Note that this information has been updated from this original proposal.

Initial Expert Group Membership:

Doug Lea
Tim Peierls
Sun Microsystems

Supporting this JSR:

Doug Lea

Section 2: Request

2.1 Please describe the proposed Specification:

The proposal extends the Java programming language in four specific ways:

  1. A syntax for defining enumerated types. This syntax provides linguistic support for the Typesafe Enumeration pattern.

  2. An automatic conversion from primitive types to their corresponding reference type wrappers. This conversion facilitates the integration of generics into the language, and reduces inessential clutter.

  3. Enhanced for loops allow convenient iteration over collections, without the need for an explicitly defined iterator. This reduces the need for boilerplate iteration code and the corresponding opportunities for errors.

  4. Static import. A mechanism to allow the use of unqualified constants.
This JSR will cover at most these four specific language changes. If other language change proposals should arise from the work of the expert group, these will be pursued in new JSRs.

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:

  • JSR-014 "Add Generic Types To The JavaTM Programming Language"
  • JSR-133 "JavaTM Memory Model and Thread Specification Revision"
  • JSR-181 "A Metadata Facility for the JavaTM Programming Language"

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.

Draft specs for enumerations, autoboxing, enhanced for loop, static import are being made available concurrently with the release of this JSR.

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
JLS level specifications.