/** @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ThrowStmt copy() { try { ThrowStmt node = (ThrowStmt) clone(); node.parent = null; if (children != null) node.children = (ASTNode[]) children.clone(); return node; } catch (CloneNotSupportedException e) { throw new Error("Error: clone not supported for " + getClass().getName()); } }
/** * Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent. * * @return dangling copy of the subtree at this node * @apilevel low-level */ @SuppressWarnings({"unchecked", "cast"}) public ThrowStmt fullCopy() { ThrowStmt tree = (ThrowStmt) copy(); if (children != null) { for (int i = 0; i < children.length; ++i) { ASTNode child = (ASTNode) children[i]; if (child != null) { child = child.fullCopy(); tree.setChild(child, i); } } } return tree; }
/** @apilevel internal */ @SuppressWarnings({"unchecked", "cast"}) public ThrowStmt clone() throws CloneNotSupportedException { ThrowStmt node = (ThrowStmt) super.clone(); node.isDAafter_Variable_values = null; node.isDUafter_Variable_values = null; node.canCompleteNormally_computed = false; node.typeNullPointerException_computed = false; node.typeNullPointerException_value = null; node.handlesException_TypeDecl_values = null; node.typeThrowable_computed = false; node.typeThrowable_value = null; node.typeNull_computed = false; node.typeNull_value = null; node.in$Circle(false); node.is$Final(false); return node; }