node.getName().accept(this);
if (node.getAST().apiLevel() >= AST.JLS3) {
if (!node.typeParameters().isEmpty()) {
this.buffer.append("<");//$NON-NLS-1$
for (Iterator it = node.typeParameters().iterator(); it.hasNext(); ) {
TypeParameter t = (TypeParameter) it.next();
t.accept(this);
if (it.hasNext()) {
this.buffer.append(",");//$NON-NLS-1$
}
}
this.buffer.append(">");//$NON-NLS-1$
}
}
this.buffer.append(" ");//$NON-NLS-1$
if (node.getAST().apiLevel() == JLS2) {
if (getSuperclass(node) != null) {
this.buffer.append("extends ");//$NON-NLS-1$
getSuperclass(node).accept(this);
this.buffer.append(" ");//$NON-NLS-1$
}
if (!superInterfaces(node).isEmpty()) {
this.buffer.append(node.isInterface() ? "extends " : "implements ");//$NON-NLS-2$//$NON-NLS-1$
for (Iterator it = superInterfaces(node).iterator(); it.hasNext(); ) {
Name n = (Name) it.next();
n.accept(this);
if (it.hasNext()) {
this.buffer.append(", ");//$NON-NLS-1$
}
}
this.buffer.append(" ");//$NON-NLS-1$
}
}
if (node.getAST().apiLevel() >= AST.JLS3) {
if (node.getSuperclassType() != null) {
this.buffer.append("extends ");//$NON-NLS-1$
node.getSuperclassType().accept(this);
this.buffer.append(" ");//$NON-NLS-1$
}
if (!node.superInterfaceTypes().isEmpty()) {
this.buffer.append(node.isInterface() ? "extends " : "implements ");//$NON-NLS-2$//$NON-NLS-1$
for (Iterator it = node.superInterfaceTypes().iterator(); it.hasNext(); ) {
Type t = (Type) it.next();
t.accept(this);
if (it.hasNext()) {
this.buffer.append(", ");//$NON-NLS-1$
}
}
this.buffer.append(" ");//$NON-NLS-1$