Skip to content

Support comments in method bodies #268

Description

@gastaldi

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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