Main { (@ public static void main(String args[]) throws Exception { CompilationUnit a = CompilationUnit.parse(System.in); a.toall(new ClassVisitor() , new MethodVisitor()); System.out.println("SUCCESS"); } @) } CompilationUnit { traversal toall (ClassVisitor v , MethodVisitor vv) { to *; } } ClassVisitor { before UnmodifiedClassDeclaration (@ System.out.println( "class =>" + host.get_ident() ); @) } MethodVisitor { before MethodDeclarator (@ System.out.println( "method => " + host.get_identifier().get_ident() ); @) before ConstructorDeclaration (@ System.out.println( "constructor => " + host.get_identifier().get_ident() ); @) }