コード例 #1
0
ファイル: Wildcard.java プロジェクト: GeneBlue/JAADAS
 /** @apilevel internal */
 @SuppressWarnings({"unchecked", "cast"})
 public Wildcard clone() throws CloneNotSupportedException {
   Wildcard node = (Wildcard) super.clone();
   node.type_computed = false;
   node.type_value = null;
   node.in$Circle(false);
   node.is$Final(false);
   return node;
 }
コード例 #2
0
ファイル: Wildcard.java プロジェクト: GeneBlue/JAADAS
 /** @apilevel internal */
 @SuppressWarnings({"unchecked", "cast"})
 public Wildcard copy() {
   try {
     Wildcard node = (Wildcard) 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());
   }
 }
コード例 #3
0
ファイル: Wildcard.java プロジェクト: GeneBlue/JAADAS
 /**
  * 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 Wildcard fullCopy() {
   Wildcard tree = (Wildcard) 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;
 }