/* (omit javadoc for this method)
  * Method declared on ASTNode.
  */
 ASTNode clone0(AST target) {
   TypeDeclaration result = new TypeDeclaration(target);
   result.setSourceRange(this.getStartPosition(), this.getLength());
   result.setJavadoc((JSdoc) ASTNode.copySubtree(target, getJavadoc()));
   if (this.ast.apiLevel == AST.JLS2_INTERNAL) {
     result.internalSetModifiers(getModifiers());
     result.setSuperclass((Name) ASTNode.copySubtree(target, getSuperclass()));
   }
   result.setName((SimpleName) getName().clone(target));
   if (this.ast.apiLevel >= AST.JLS3) {
     result.modifiers().addAll(ASTNode.copySubtrees(target, modifiers()));
     result.setSuperclassType((Type) ASTNode.copySubtree(target, getSuperclassType()));
   }
   result.bodyDeclarations().addAll(ASTNode.copySubtrees(target, bodyDeclarations()));
   return result;
 }