Unable to see Java 5 features from Doclet API

The Doclet API was extended in Java 5 for getting information in generics, but I have been unable to get it to work. For example, calling ClassDoc.typeParameters and typeParamTags always returns an empty array.

/**

* @param <X> The X

*/

publicclass Test<X>{

}

And the Doclet is:

import com.sun.javadoc.*;

publicclass TestDocextends Doclet{

publicstaticboolean start(RootDoc root){

for (ClassDoc cd : root.classes()){

System.out.println();

System.out.println(cd);

TypeVariable[] tv = cd.typeParameters();

if (tv.length == 0){

System.out.println("No type parameters");

}else{

for (TypeVariable t : tv){

System.out.println("tv: " + t);

}

}

ParamTag[] pt = cd.typeParamTags();

if (pt.length == 0){

System.out.println("No type parameter tags");

}else{

for (ParamTag t : pt){

System.out.println("pt: " + t);

}

}

}

returntrue;

}

}

For the Test class, it always prints out:

No type parameters

No type parameter tags

I'm running version 1.5.0_05. Is there some magic flag that needs to get passed? I have been unable to see any evidence that the new Java 5 API does anything at all.

[2574 byte] By [broneill2a] at [2007-10-2 10:16:21]
# 1
Did you solve the problem? I have similar problems. need help.Message was edited by: tarzan68
tarzan68a at 2007-7-13 1:41:41 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...
# 2

Implementing

public static LanguageVersion languageVersion() {

return LanguageVersion.JAVA_1_5;

}

in my extension doclet solved the problem. Is part of the transition documentation from javadoc 1.2 to javadoc 1.5, but can not easily be found, not even a useful hint link.

tarzan68a at 2007-7-13 1:41:42 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...