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

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

Go to download

The Checker Framework enhances Java's type system to make it more powerful and useful. This lets software developers detect and prevent errors in their Java programs. The Checker Framework includes compiler plug-ins ("checkers") that find bugs or verify their absence. It also permits you to write your own compiler plug-ins.

The newest version!
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 - 2024 Weber Informatics LLC | Privacy Policy