我的第一种方法是在case语句是一个‘表达式语句’和表达式是一个特定的‘方法调用表达式’时返回一个注释。goes here return new LineComment(expStmt.toString()); }但当将单元转储回字符串时java.lang.ClassCastException: com.github.javaparser.ast.comments.LineComment cannot be cast to com.
使用这些字符串进行更改后,生成将失败,如下所示: at com.github.javaparser.ASTParser.jj_3R_92(ASTParser.java:5504)
at com.github.javaparser.ASTParser.jjat com.github.javaparser.ASTParser.C