analyze-java-code-examples
analyze-java-code-examples copied to clipboard
Anonymous inner classes cannot output
new VoidVisitorAdapter<Object>() {
@Override
public void visit(ClassOrInterfaceDeclaration n, Object arg) {
super.visit(n, arg);
System.out.println(" * " + n.getName());
}
}.visit(StaticJavaParser.parse(BFile_sourcePath), null);
package test;
public class B {
public void print() {
new BInternal(){}.test();
}
}
class BInternal {
void test() {
}
}
only print
* B
* BInternal
need print
* B$1
also
Thank you for reporting this