/* * @see ASTVisitor#visit(TypeParameter) * @since 3.0 */ public boolean visit(TypeParameter node) { node.getName().accept(this); if (!node.typeBounds().isEmpty()) { this.fBuffer.append(" extends "); // $NON-NLS-1$ for (Iterator it = node.typeBounds().iterator(); it.hasNext(); ) { Type t = (Type) it.next(); t.accept(this); if (it.hasNext()) { this.fBuffer.append(" & "); // $NON-NLS-1$ } } } return false; }
/* * @see ASTVisitor#visit(TypeParameter) * @since 3.0 */ @Override public boolean visit(TypeParameter node) { printModifiers(node.modifiers()); node.getName().accept(this); if (!node.typeBounds().isEmpty()) { this.fBuffer.append(" extends "); // $NON-NLS-1$ for (Iterator<Type> it = node.typeBounds().iterator(); it.hasNext(); ) { Type t = it.next(); t.accept(this); if (it.hasNext()) { this.fBuffer.append(" & "); // $NON-NLS-1$ } } } return false; }
/* (omit javadoc for this method) * Method declared on ASTNode. */ ASTNode clone0(AST target) { TypeParameter result = new TypeParameter(target); result.setSourceRange(getStartPosition(), getLength()); if (this.ast.apiLevel >= AST.JLS8) { result.annotations().addAll(ASTNode.copySubtrees(target, annotations())); } result.setName((SimpleName) ((ASTNode) getName()).clone(target)); result.typeBounds().addAll(ASTNode.copySubtrees(target, typeBounds())); return result; }