co.streamx.fluent.extree.expression.ConstantExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ex-tree Show documentation
Show all versions of ex-tree Show documentation
Build AST from the bytecode
The newest version!
package co.streamx.fluent.extree.expression;
import lombok.Getter;
/**
* Represents an expression that has a constant value.
*
*
*/
@Getter
public final class ConstantExpression extends Expression {
private final Object value;
ConstantExpression(Class> resultType, Object value) {
super(ExpressionType.Constant, resultType);
this.value = value;
}
@Override
protected T visit(ExpressionVisitor v) {
return v.visit(this);
}
@Override
public String toString() {
Object value = getValue();
return String.valueOf(value);
}
}