Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3676

Error adding Javadoc to new method on Java file (Not ITD file)

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0.M1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I'm trying to set a CommentStructure into a MethodMetadataBuilder, which will be added directly into a Java file. (Not a ITD!!)
      I'm setting this CommentStructure as follow:

          MethodMetadataBuilder methodBuilder = new MethodMetadataBuilder(
                      declaredByMetadataId, Modifier.PUBLIC, methodName, RETURN_TYPE,
                      parameterTypes, parameterNames, bodyBuilder);
      
              List<AbstractComment> javadocComments = new ArrayList<AbstractComment>();
              javadocComments.add(new JavadocComment("foo"));
      
              CommentStructure commentStructure = new CommentStructure();
              commentStructure.setBeginComments(javadocComments);
              methodBuilder.setCommentStructure(commentStructure);
      
      return methodBuilder.build();
      

      Then I'm adding the built method into a Java file with a code like following:

              detailsBuilder.addMethod(methodBuilder);
      
              getTypeManagementService().createOrUpdateTypeOnDisk(
                      detailsBuilder.build());
      

      Method is wrote correctly on JavaFile but there is not Javadoc structure.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                eruiz Enrique Ruiz (DiSiD)
                Reporter:
                frnore Fran Cardoso
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: