Skip to content

Support comments in method bodies #268

Open
@gastaldi

Description

Discussed in #267

Originally posted by panderior November 6, 2022
When I try to add a line comment to a Java class code I am trying to generate, the roaster library removes the comment and gives just the code.

My intention is to generate a code like this:

public class A {
    public void helper () {
         // this is a comment
         System.out.println("Success");
}}

What have I tried:

  • I have tried class and method level JavaDoc, which is a nice feature. But I also want to use line comment.
  • I have tried getting the "toUnformattedString" on the JavaClassSource, but the line comments just won't appear.

Your help is very appreciated. Thank you.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions