use of com.github.javaparser.ast.expr.NameExpr in project Gargoyle by callakrsos.
the class BaseInfoComposite method start.
/**
*
* 코드 분석 시작 처리.
* @작성자 : KYJ
* @작성일 : 2017. 2. 3.
*/
public void start() {
// 동적처리에 따라 API 함수 수정.
FileUtil.consumeJavaParser(targetFile, cu -> {
NameExpr name = cu.getPackage().getName();
lblPackage.setText(name.toString());
String importStatement = cu.getImports().stream().map(im -> im.getName().toString()).collect(Collectors.joining(","));
lblImports.setText(importStatement);
Service<Void> service = new Service<Void>() {
@Override
protected Task<Void> createTask() {
return new Task<Void>() {
@Override
protected Void call() throws Exception {
new MethodVisitor(v -> {
methodData.add(v);
}).visit(cu, null);
return null;
}
};
}
};
service.start();
}, err -> {
LOGGER.error(ValueUtil.toString(err));
});
}
Aggregations