United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4909767 Add Doclet.languageVersion method.
JDK-4909767 : Add Doclet.languageVersion method.

Details
Type:
Enhancement
Submit Date:
2003-08-20
Status:
Resolved
Updated Date:
2003-09-26
Project Name:
JDK
Resolved Date:
2003-09-26
Component:
tools
OS:
solaris_9
Sub-Component:
javadoc(tool)
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
5.0 (tiger)

Related Reports
Relates:

Sub Tasks

Description
 This proposal is an update to 4421066.  It modifies an interface
 change that has not yet been publically released.


 Background

 The javadoc tool maintains backward compatibility for "legacy" doclets --
 those not aware of the Tiger language features.  It modifies the
 results of a number of methods to match as closely as possible the
 pre-Tiger results.  For example, type parameters are elided.

 The javadoc tool must be able to determine if a doclet supports the
 1.5 language features.  It currently relies on a marker interface
 Doclet15 for new doclets to implement.  The name Doclet15, and
 its use as a marker interface, are ugly and nonintuitive.  It would be
 ideal if we could have a Doclet interface for doclets to implement.
 Unfortunately the class name Doclet is already taken by a so-called
 "example" doclet, and the entry point methods of a doclet are all (for
 no good reason) static.


 Proposal

 Drop Doclet15.  Instead, a doclet should indicate its language version
 by supplying a languageVersion method.  This has the side benefit of
 being extensible for possible language changes in, say, Mustang.  The
 "example" Doclet class has the following addition:

     /**
      * Return the version of the Java Programming Language supported
      * by this doclet.
      * <p>
      * This method is required by any doclet supporting a language version
      * other than 1.1.
      *
      * @return	the language version supported by this doclet;
      *		default is 1.1
      * @since 1.5
      */
     public static LanguageVersion languageVersion() {
	 return LanguageVersion.JDK1_1;
     }

 LanguageVersion is defined as:

     /**
      * Java Programming Language version.  The constants of this enum
      * identify the JDK and J2SE releases containing language changes
      * relevant to doclets.
      * <p>
      * All doclets support at least the 1.1 language version.
      * The first release subsequent to this with language changes
      * affecting doclets is 1.5.
      *
      * @since 1.5
      */
     public enum LanguageVersion {

	 /** JDK 1.1:  added nested classes and interfaces. */
	 JDK1_1,

	 /** J2SE 1.5:  added generic types, enums, varargs, and annotations. */
	 J2SE1_5
     }


                                    

Comments
EVALUATION


Good idea.  Do it.

###@###.### 2003-08-20

                                     
2003-08-20
PUBLIC COMMENTS

-
                                     
2004-06-10
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger

FIXED IN:
tiger

INTEGRATED IN:
tiger
tiger-b22


                                     
2004-06-14



Hardware and Software, Engineered to Work Together