/* (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; }
/* (omit javadoc for this method) * Method declared on ASTNode. */ final ASTNode internalGetSetChildProperty( ChildPropertyDescriptor property, boolean get, ASTNode child) { if (property == JAVADOC_PROPERTY) { if (get) { return getJavadoc(); } else { setJavadoc((JSdoc) child); return null; } } if (property == NAME_PROPERTY) { if (get) { return getName(); } else { setName((SimpleName) child); return null; } } if (property == SUPERCLASS_PROPERTY) { if (get) { return getSuperclass(); } else { setSuperclass((Name) child); return null; } } if (property == SUPERCLASS_TYPE_PROPERTY) { if (get) { return getSuperclassType(); } else { setSuperclassType((Type) child); return null; } } // allow default implementation to flag the error return super.internalGetSetChildProperty(property, get, child); }