コード例 #1
0
 /*
  * @see ASTVisitor#visit(PackageDeclaration)
  */
 public boolean visit(PackageDeclaration node) {
   if (node.getAST().apiLevel() >= AST.JLS3) {
     if (node.getJavadoc() != null) {
       node.getJavadoc().accept(this);
     }
     for (Iterator it = node.annotations().iterator(); it.hasNext(); ) {
       Annotation p = (Annotation) it.next();
       p.accept(this);
       this.fBuffer.append(" "); // $NON-NLS-1$
     }
   }
   this.fBuffer.append("package "); // $NON-NLS-1$
   node.getName().accept(this);
   this.fBuffer.append(";"); // $NON-NLS-1$
   return false;
 }
コード例 #2
0
 /*
  * @see ASTVisitor#visit(PackageDeclaration)
  */
 @Override
 public boolean visit(PackageDeclaration node) {
   doVisitNode(node.getJavadoc());
   doVisitChildren(node.annotations());
   return false;
 }