VisitorのうちFieldDeclaration? を引数に取る
public boolean visit(FieldDeclaration node);
はフィールドの情報を取ることができます。FieldDeclaration? はあるソースコード内の一つのフィールドに対応しています。
Type varType = element.getType(); <-element が FieldDeclaration System.out.println(varType.toString()) VariableDeclarationFragment var = (VariableDeclarationFragment)element.fragments().get(0); // int i,jとか書くからかな? System.out.println(var.toString());
この記事は
現在のアクセス:8222