Невозможно получить метод документа с помощью GroovyRootDocBuilder - PullRequest
0 голосов
/ 23 ноября 2018

Я пытаюсь получить документ класса с помощью GroovyRootDocBuilder

 Properties properties = new Properties();
    properties.setProperty("publicScope", "true");
    properties.setProperty("protectedScope", "true");
    properties.setProperty("packageScope", "true");
    properties.setProperty("privateScope", "true");
    GroovyRootDocBuilder rootDocBuilder = new GroovyRootDocBuilder(null, null, null, properties);
    String filename = "D:\\git\\pdf-enricher\\src\\main\\groovy\\com\\pdfflow\\enricher\\operations\\PageOperations.groovy"
    String src = ResourceGroovyMethods.getText(new File(filename));
    String file = GroovyDocTool.getFile(filename);
    Map<String, GroovyClassDoc> ret = rootDocBuilder.getClassDocsFromSingleSource("com.pdfflow.enricher.operations", src, file);
    System.out.println(ret);

Я получаю только документ класса и документ конструктора, я не могу получить какую-либо информацию для метода и документа поля.

1 Ответ

0 голосов
/ 24 ноября 2018

Моя ошибка ... я передавал src и файл в неправильном порядке в getClassDocsFromSingleSource

...