diff options
Diffstat (limited to 'third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseAndNode.java')
-rw-r--r-- | third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseAndNode.java | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseAndNode.java b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseAndNode.java index 82c5f5d5f8..18d7163f22 100644 --- a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseAndNode.java +++ b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseAndNode.java @@ -1,14 +1,8 @@ package org.checkerframework.dataflow.cfg.node; -import java.util.Collection; -import java.util.LinkedList; - -import org.checkerframework.dataflow.util.HashCodeUtils; - -import org.checkerframework.javacutil.InternalUtils; - -import com.sun.source.tree.Tree; +import com.sun.source.tree.BinaryTree; import com.sun.source.tree.Tree.Kind; +import org.checkerframework.dataflow.util.HashCodeUtils; /** * A node for the bitwise or logical (single bit) and operation: @@ -19,33 +13,12 @@ import com.sun.source.tree.Tree.Kind; * * @author Stefan Heule * @author Charlie Garrett - * */ -public class BitwiseAndNode extends Node { - - protected Tree tree; - protected Node left; - protected Node right; +public class BitwiseAndNode extends BinaryOperationNode { - public BitwiseAndNode(Tree tree, Node left, Node right) { - super(InternalUtils.typeOf(tree)); + public BitwiseAndNode(BinaryTree tree, Node left, Node right) { + super(tree, left, right); assert tree.getKind() == Kind.AND; - this.tree = tree; - this.left = left; - this.right = right; - } - - public Node getLeftOperand() { - return left; - } - - public Node getRightOperand() { - return right; - } - - @Override - public Tree getTree() { - return tree; } @Override @@ -72,12 +45,4 @@ public class BitwiseAndNode extends Node { public int hashCode() { return HashCodeUtils.hash(getLeftOperand(), getRightOperand()); } - - @Override - public Collection<Node> getOperands() { - LinkedList<Node> list = new LinkedList<Node>(); - list.add(getLeftOperand()); - list.add(getRightOperand()); - return list; - } } |