
org.checkerframework.dataflow.cfg.node.UnaryOperationNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dataflow-shaded Show documentation
Show all versions of dataflow-shaded Show documentation
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.
package org.checkerframework.dataflow.cfg.node;
import com.sun.source.tree.UnaryTree;
import org.checkerframework.dataflow.qual.SideEffectFree;
import org.checkerframework.javacutil.TreeUtils;
import java.util.Collection;
import java.util.Collections;
/**
* A node for a postfix or an unary expression.
*
* For example:
*
*
* operator expressionNode
*
* expressionNode operator
*
*/
public abstract class UnaryOperationNode extends Node {
protected final UnaryTree tree;
protected final Node operand;
protected UnaryOperationNode(UnaryTree tree, Node operand) {
super(TreeUtils.typeOf(tree));
this.tree = tree;
this.operand = operand;
}
public Node getOperand() {
return this.operand;
}
@Override
public UnaryTree getTree() {
return tree;
}
@Override
@SideEffectFree
public Collection getOperands() {
return Collections.singletonList(getOperand());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy