net.sourceforge.pmd.lang.java.ast.ASTNullLiteral Maven / Gradle / Ivy
The newest version!
/**
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.java.ast;
import org.checkerframework.checker.nullness.qual.Nullable;
import net.sourceforge.pmd.lang.document.Chars;
/**
* The null literal.
*
*
*
* NullLiteral ::= "null"
*
*
*/
public final class ASTNullLiteral extends AbstractLiteral implements ASTLiteral {
ASTNullLiteral(int id) {
super(id);
}
@Override
public R acceptVisitor(JavaVisitor super P, ? extends R> visitor, P data) {
return visitor.visit(this, data);
}
@Override
public boolean isCompileTimeConstant() {
return false;
}
@Override
public @Nullable Object getConstValue() {
return null;
}
@Override
public Chars getLiteralText() {
return super.getLiteralText();
}
}