@Override public AttrsNode clone() throws CloneNotSupportedException { AttrsNode clone = (AttrsNode) super.clone(); // shallow copy if (this.attributes != null) { clone.attributes = new LinkedList<Attr>(this.attributes); } if (this.attributes != null) { clone.attributeBlocks = new LinkedList<String>(this.attributeBlocks); } return clone; } public void addAttributes(String src){
@Override public Node clone() throws CloneNotSupportedException { Node clone = (Node) super.clone(); // Deep copy block if (this.block != null) { clone.block = this.block.clone(); } clone.nodes = new LinkedList<Node>(); for (Node node : this.nodes) { clone.nodes.add(node.clone()); } return clone; } }
@Override public CaseNode clone() throws CloneNotSupportedException { CaseNode clone = (CaseNode) super.clone(); clone.caseConditionNodes = new LinkedList<CaseConditionNode>(); for(CaseConditionNode condition : caseConditionNodes) { clone.caseConditionNodes.add((CaseConditionNode) condition.clone()); } return clone; } }
@Override public ConditionalNode clone() throws CloneNotSupportedException { ConditionalNode clone = (ConditionalNode) super.clone(); clone.conditions = new LinkedList<IfConditionNode>(); for(IfConditionNode condition : conditions) { clone.conditions.add((IfConditionNode) condition.clone()); } return clone; } }
@Override public Node clone() throws CloneNotSupportedException { Node clone = (Node) super.clone(); // Deep copy block if (this.block != null) { clone.block = this.block.clone(); } clone.nodes = new LinkedList<Node>(); for (Node node : this.nodes) { clone.nodes.add(node.clone()); } return clone; } }
@Override public AttrsNode clone() throws CloneNotSupportedException { AttrsNode clone = (AttrsNode) super.clone(); // shallow copy if (this.attributes != null) { clone.attributes = new LinkedList<Attr>(this.attributes); } if (this.attributes != null) { clone.attributeBlocks = new LinkedList<String>(this.attributeBlocks); } return clone; } public void addAttributes(String src){
@Override public ConditionalNode clone() throws CloneNotSupportedException { ConditionalNode clone = (ConditionalNode) super.clone(); clone.conditions = new LinkedList<IfConditionNode>(); for(IfConditionNode condition : conditions) { clone.conditions.add((IfConditionNode) condition.clone()); } return clone; } }
@Override public CaseNode clone() throws CloneNotSupportedException { CaseNode clone = (CaseNode) super.clone(); clone.caseConditionNodes = new LinkedList<CaseConditionNode>(); for(CaseConditionNode condition : caseConditionNodes) { clone.caseConditionNodes.add((CaseConditionNode) condition.clone()); } return clone; } }