コード例 #1
0
 @Override
 public void visit(final CompilationUnit n, final A arg) {
   visitComment(n.getComment(), arg);
   if (n.getPackage() != null) {
     n.getPackage().accept(this, arg);
   }
   if (n.getImports() != null) {
     for (final ImportDeclaration i : n.getImports()) {
       i.accept(this, arg);
     }
   }
   if (n.getTypes() != null) {
     for (final TypeDeclaration<?> typeDeclaration : n.getTypes()) {
       typeDeclaration.accept(this, arg);
     }
   }
 }
コード例 #2
0
 @Override
 public void visit(final ImportDeclaration n, final A arg) {
   visitComment(n.getComment(), arg);
   n.getName().accept(this, arg);
 }