예제 #1
0
 @SuppressWarnings({"unchecked", "cast"})
 public NEExpr clone() throws CloneNotSupportedException {
   NEExpr node = (NEExpr) super.clone();
   node.in$Circle(false);
   node.is$Final(false);
   return node;
 }
예제 #2
0
 @SuppressWarnings({"unchecked", "cast"})
 public NEExpr fullCopy() {
   NEExpr res = (NEExpr) copy();
   for (int i = 0; i < getNumChildNoTransform(); i++) {
     ASTNode node = getChildNoTransform(i);
     if (node != null) node = node.fullCopy();
     res.setChild(node, i);
   }
   return res;
 }
예제 #3
0
 @SuppressWarnings({"unchecked", "cast"})
 public NEExpr copy() {
   try {
     NEExpr node = (NEExpr) clone();
     if (children != null) node.children = (ASTNode[]) children.clone();
     return node;
   } catch (CloneNotSupportedException e) {
   }
   System.err.println("Error: Could not clone node of type " + getClass().getName() + "!");
   return null;
 }