/* * @see ASTVisitor#visit(VariableDeclarationExpression) */ public boolean visit(VariableDeclarationExpression node) { if (node.getAST().apiLevel() >= AST.JLS3) { printModifiers(node.modifiers()); } node.getType().accept(this); this.fBuffer.append(" "); // $NON-NLS-1$ for (Iterator it = node.fragments().iterator(); it.hasNext(); ) { VariableDeclarationFragment f = (VariableDeclarationFragment) it.next(); f.accept(this); if (it.hasNext()) { this.fBuffer.append(", "); // $NON-NLS-1$ } } return false; }
/* * @see ASTVisitor#visit(VariableDeclarationStatement) */ @Override public boolean visit(VariableDeclarationStatement node) { if (node.getAST().apiLevel() >= JLS3) { printModifiers(node.modifiers()); } node.getType().accept(this); this.fBuffer.append(" "); // $NON-NLS-1$ for (Iterator<VariableDeclarationFragment> it = node.fragments().iterator(); it.hasNext(); ) { VariableDeclarationFragment f = it.next(); f.accept(this); if (it.hasNext()) { this.fBuffer.append(", "); // $NON-NLS-1$ } } this.fBuffer.append(";"); // $NON-NLS-1$ return false; }