diff options
Diffstat (limited to 'third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseOrNode.java')
-rw-r--r-- | third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseOrNode.java | 45 |
1 files changed, 5 insertions, 40 deletions
diff --git a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseOrNode.java b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseOrNode.java index f9763c9b14..66089133f2 100644 --- a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseOrNode.java +++ b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/BitwiseOrNode.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) or operation: @@ -19,33 +13,12 @@ import com.sun.source.tree.Tree.Kind; * * @author Stefan Heule * @author Charlie Garrett - * */ -public class BitwiseOrNode extends Node { - - protected Tree tree; - protected Node left; - protected Node right; +public class BitwiseOrNode extends BinaryOperationNode { - public BitwiseOrNode(Tree tree, Node left, Node right) { - super(InternalUtils.typeOf(tree)); + public BitwiseOrNode(BinaryTree tree, Node left, Node right) { + super(tree, left, right); assert tree.getKind() == Kind.OR; - 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 BitwiseOrNode 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; - } } |