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

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

package org.checkerframework.dataflow.cfg.node;

import com.sun.source.tree.LiteralTree;
import com.sun.source.tree.Tree;

import org.checkerframework.checker.nullness.qual.Nullable;

/**
 * A node for the null literal.
 *
 * 
 *   null
 * 
*/ public class NullLiteralNode extends ValueLiteralNode { /** * Create a new NullLiteralNode. * * @param t the tree for the literal value */ public NullLiteralNode(LiteralTree t) { super(t); assert t.getKind() == Tree.Kind.NULL_LITERAL; } @Override public Void getValue() { return (Void) tree.getValue(); } @Override public R accept(NodeVisitor visitor, P p) { return visitor.visitNullLiteral(this, p); } @Override public boolean equals(@Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof NullLiteralNode)) { return false; } // super method compares values return super.equals(obj); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy