@@ -667,16 +667,28 @@ public static void setEnumDocumentation(Configuration configuration,
667
667
for (int j = 0 ; j < methods .length ; j ++) {
668
668
MethodDoc currentMethod = methods [j ];
669
669
if (currentMethod .name ().equals ("values" ) &&
670
- currentMethod .parameters ().length == 0 ) {
671
- currentMethod .setRawCommentText (
672
- configuration .getText ("doclet.enum_values_doc" , classDoc .name ()));
670
+ currentMethod .parameters ().length == 0 ) {
671
+ StringBuilder sb = new StringBuilder ();
672
+ sb .append (configuration .getText ("doclet.enum_values_doc.main" , classDoc .name ()));
673
+ sb .append ("\n @return " );
674
+ sb .append (configuration .getText ("doclet.enum_values_doc.return" ));
675
+ currentMethod .setRawCommentText (sb .toString ());
673
676
} else if (currentMethod .name ().equals ("valueOf" ) &&
674
- currentMethod .parameters ().length == 1 ) {
677
+ currentMethod .parameters ().length == 1 ) {
675
678
Type paramType = currentMethod .parameters ()[0 ].type ();
676
679
if (paramType != null &&
677
- paramType .qualifiedTypeName ().equals (String .class .getName ())) {
678
- currentMethod .setRawCommentText (
679
- configuration .getText ("doclet.enum_valueof_doc" ));
680
+ paramType .qualifiedTypeName ().equals (String .class .getName ())) {
681
+ StringBuilder sb = new StringBuilder ();
682
+ sb .append (configuration .getText ("doclet.enum_valueof_doc.main" , classDoc .name ()));
683
+ sb .append ("\n @param name " );
684
+ sb .append (configuration .getText ("doclet.enum_valueof_doc.param_name" ));
685
+ sb .append ("\n @return " );
686
+ sb .append (configuration .getText ("doclet.enum_valueof_doc.return" ));
687
+ sb .append ("\n @throws IllegalArgumentException " );
688
+ sb .append (configuration .getText ("doclet.enum_valueof_doc.throws_ila" ));
689
+ sb .append ("\n @throws NullPointerException " );
690
+ sb .append (configuration .getText ("doclet.enum_valueof_doc.throws_npe" ));
691
+ currentMethod .setRawCommentText (sb .toString ());
680
692
}
681
693
}
682
694
}
0 commit comments