How to generate comment inside a method with JCodeModel

596 views Asked by At

I need something like this

public void method() {
    //TODO generated sources
}

Here is how I generate a class and a method

JCodeModel cm = new JCodeModel();
JDefinedClass dc = cm._class("MyClass");
JMethod method = dc.method(JMod.PUBLIC, cm.VOID,"method");
1

There are 1 answers

0
user1745356 On

adding method.body().directStatement("//TODO generated sources"); worked