All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.checkerframework.dataflow.cfg.node.BinaryOperationNode Maven / Gradle / Ivy

Go to download

dataflow-shaded is a dataflow framework based on the javac compiler. It differs from the org.checkerframework:dataflow artifact in two ways. First, the packages in this artifact have been renamed to org.checkerframework.shaded.*. Second, unlike the dataflow artifact, this artifact contains the dependencies it requires.

There is a newer version: 3.42.0-eisop5
Show newest version
package org.checkerframework.dataflow.cfg.node;

import com.sun.source.tree.BinaryTree;

import org.checkerframework.dataflow.qual.SideEffectFree;
import org.checkerframework.javacutil.TreeUtils;

import java.util.Arrays;
import java.util.Collection;

/**
 * A node for a binary expression.
 *
 * 

For example: * *

 *   lefOperandNode operator rightOperandNode
 * 
*/ public abstract class BinaryOperationNode extends Node { protected final BinaryTree tree; protected final Node left; protected final Node right; protected BinaryOperationNode(BinaryTree tree, Node left, Node right) { super(TreeUtils.typeOf(tree)); this.tree = tree; this.left = left; this.right = right; } public Node getLeftOperand() { return left; } public Node getRightOperand() { return right; } @Override public BinaryTree getTree() { return tree; } @Override @SideEffectFree public Collection getOperands() { return Arrays.asList(getLeftOperand(), getRightOperand()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy