[英]Cannot resolve method accept for JSQLParser
For condition.accept
I get the error "cannot resolve method 'accept(cs4321.project2.Operators.SelectExpressionVisitor)". 对于
condition.accept
我得到错误“无法解析方法'accept(cs4321.project2.Operators.SelectExpressionVisitor)”。 I'm not sure why because I'm following the Expression accept
method syntax correctly. 我不确定为什么,因为我正确遵循了Expression
accept
方法语法。
public class SelectExpressionVisitor implements ExpressionVisitor {
private Tuple tuple;
private Map<String, Integer> colToTupleIndexMap;
private boolean tupleFollowsCondition;
public SelectExpressionVisitor(Tuple tuple) {
this.tuple = tuple;
colToTupleIndexMap = DatabaseCatalog.getInstance()
.colToTupleIndexMap;
tupleFollowsCondition = false;
}
public Tuple getSelectTuple(Expression condition) {
condition.accept(this);
if(tupleFollowsCondition) {
return tuple;
}
return null;
}
}
I realized I imported the wrong Expression class, which didn't have an accept method. 我意识到我导入了错误的Expression类,该类没有一个accept方法。
Correct import statement 正确的进口声明
import net.sf.jsqlparser.expression.Expression;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.