public Expr simplify() { expr = expr.simplify(); return this; }
public Expr simplify() { List paramExprs = getParameters(); int paramSize = paramExprs.size(); List newParams = new ArrayList(paramSize); for (int i = 0; i < paramSize; ++i) { Expr eachParam = (Expr) paramExprs.get(i); newParams.add(eachParam.simplify()); } this.parameters = newParams; return this; }
public void simplify() { setExpr( getExpr().simplify() ); }
public void simplify() { setRootExpr( getRootExpr().simplify() ); }
public Expr simplify() { this.predicates.simplify(); if ( this.expr != null ) { this.expr = this.expr.simplify(); } if ( this.predicates.getPredicates().size() == 0 ) { return getExpr(); } return this; }
public Expr simplify() { if (getFilterExpr() != null) { setFilterExpr(getFilterExpr().simplify()); } if (getLocationPath() != null) { getLocationPath().simplify(); } if (getFilterExpr() == null && getLocationPath() == null) { return null; } if (getLocationPath() == null) { return getFilterExpr(); } if (getFilterExpr() == null) { return getLocationPath(); } return this; }
private String getLiteralFromExpression(Expr expr) throws CompilationException { expr = expr.simplify(); if (expr instanceof LiteralExpr) return ((LiteralExpr)expr).getLiteral(); throw new CompilationException(__msgs.errLiteralExpected(expr.getText())); }