Wednesday, February 8, 2012

Java2Html

@Grapes(
    @Grab(group='de.java2html', module='java2html', version='5.0')
)
import de.java2html.*;
import de.java2html.options.*;

String javaText = '''
/**
 * This is about ClassName.
 * {@link com.yourCompany.aPackage.SuperClass}
 * @author author
 */
public class ClassName extends SuperClass {
  /* This comment may span multiple lines. */
  private int integer = 0;
  public final static char character = 'A';
  // This comment may span only this line
  private String string = "zero";
}
'''

JavaSourceConversionSettings conversionOptions = new JavaSourceConversionSettings(new JavaSourceConversionOptions());
String htmlText = Java2Html.convertToHtmlPage(javaText, conversionOptions);
println (htmlText)

No comments:

Post a Comment