private static Object[] getLiteralList(ExprNodeGenericFuncDesc expr, BoxType boxType, int start) { List<ExprNodeDesc> children = expr.getChildren(); Object[] result = new Object[children.size() - start]; // ignore the first child, since it is the variable int posn = 0; for(ExprNodeDesc child: children.subList(start, children.size())) { if (child instanceof ExprNodeConstantDesc) { result[posn++] = boxLiteral((ExprNodeConstantDesc) child, boxType); } else { // if we get some non-literals, we need to punt return null; } } return result; }
private static Object[] getLiteralList(ExprNodeGenericFuncDesc expr, PredicateLeaf.Type type, int start) { List<ExprNodeDesc> children = expr.getChildren(); Object[] result = new Object[children.size() - start]; // ignore the first child, since it is the variable int posn = 0; for(ExprNodeDesc child: children.subList(start, children.size())) { if (child instanceof ExprNodeConstantDesc) { result[posn++] = boxLiteral((ExprNodeConstantDesc) child, type); } else { // if we get some non-literals, we need to punt return null; } } return result; }
private static Object getLiteral(Configuration conf, ExprNodeDesc child, BoxType boxType) { if (child instanceof ExprNodeConstantDesc) { return boxLiteral((ExprNodeConstantDesc) child, boxType); } else if (child instanceof ExprNodeDynamicValueDesc) { LiteralDelegate value = ((ExprNodeDynamicValueDesc) child).getDynamicValue(); value.setConf(conf); return value; } return null; }
private static Object getLiteral(Configuration conf, ExprNodeDesc child, PredicateLeaf.Type type) { if (child instanceof ExprNodeConstantDesc) { return boxLiteral((ExprNodeConstantDesc) child, type); } else if (child instanceof ExprNodeDynamicValueDesc) { LiteralDelegate value = ((ExprNodeDynamicValueDesc) child).getDynamicValue(); value.setConf(conf); return value; } return null; }