@Override protected Object getProperty(Bindings bindings, ELContext context) throws ELException { return property.eval(bindings, context); }
@Override public Object eval(Bindings bindings, ELContext context) { return child.eval(bindings, context); }
@Override public Object eval(Bindings bindings, ELContext context) { return child.eval(bindings, context); }
@Override public Object[] eval(Bindings bindings, ELContext context) { Object[] result = new Object[nodes.size()]; for (int i = 0; i < nodes.size(); i++) { result[i] = nodes.get(i).eval(bindings, context); } return result; }
@Override public Object[] eval(Bindings bindings, ELContext context) { Object[] result = new Object[nodes.size()]; for (int i = 0; i < nodes.size(); i++) { result[i] = nodes.get(i).eval(bindings, context); } return result; }
public Object eval(Bindings bindings, ELContext context, AstNode left, AstNode right) { Boolean l = bindings.convert(left.eval(bindings, context), Boolean.class); return Boolean.TRUE.equals(l) ? Boolean.TRUE : bindings.convert(right.eval(bindings, context), Boolean.class); } @Override public String toString() { return "||"; }
public Object eval(Bindings bindings, ELContext context, AstNode left, AstNode right) { Boolean l = bindings.convert(left.eval(bindings, context), Boolean.class); return Boolean.TRUE.equals(l) ? bindings.convert(right.eval(bindings, context), Boolean.class) : Boolean.FALSE; } @Override public String toString() { return "&&"; }
public Object eval(Bindings bindings, ELContext context, AstNode left, AstNode right) { Boolean l = bindings.convert(left.eval(bindings, context), Boolean.class); return Boolean.TRUE.equals(l) ? Boolean.TRUE : bindings.convert(right.eval(bindings, context), Boolean.class); } @Override public String toString() { return "||"; }
public Object eval(Bindings bindings, ELContext context, AstNode left, AstNode right) { Boolean l = bindings.convert(left.eval(bindings, context), Boolean.class); return Boolean.TRUE.equals(l) ? bindings.convert(right.eval(bindings, context), Boolean.class) : Boolean.FALSE; } @Override public String toString() { return "&&"; }
/** * evaluate and return the (optionally coerced) result. */ public final Object getValue(Bindings bindings, ELContext context, Class<?> type) { Object value = eval(bindings, context); if (type != null) { value = bindings.convert(value, type); } return value; }
/** * evaluate and return the (optionally coerced) result. */ public final Object getValue(Bindings bindings, ELContext context, Class<?> type) { Object value = eval(bindings, context); if (type != null) { value = bindings.convert(value, type); } return value; }
@Override public Object eval(Bindings bindings, ELContext context) { StringBuilder b = new StringBuilder(16); for (int i = 0; i < getCardinality(); i++) { b.append(bindings.convert(nodes.get(i).eval(bindings, context), String.class)); } return b.toString(); }
@Override public Object eval(Bindings bindings, ELContext context) { StringBuilder b = new StringBuilder(16); for (int i = 0; i < getCardinality(); i++) { b.append(bindings.convert(nodes.get(i).eval(bindings, context), String.class)); } return b.toString(); }
@Override public Object eval(Bindings bindings, ELContext context) { List<Object> list = new ArrayList<>(); for (int i = 0; i < elements.getCardinality(); i++) { list.add(elements.getChild(i).eval(bindings, context)); } return new PyList(list); }
@Override public Object eval(Bindings bindings, ELContext context) { return new NamedParameter(name.getName(), value.eval(bindings, context)); }
public ValueReference getValueReference(Bindings bindings, ELContext context) { Object base = prefix.eval(bindings, context); if (base == null) { throw new PropertyNotFoundException(LocalMessages.get("error.property.base.null", prefix)); } Object property = getProperty(bindings, context); if (property == null && strict) { throw new PropertyNotFoundException(LocalMessages.get("error.property.property.notfound", "null", base)); } return new ValueReference(base, property); }
public ValueReference getValueReference(Bindings bindings, ELContext context) { Object base = prefix.eval(bindings, context); if (base == null) { throw new PropertyNotFoundException(LocalMessages.get("error.property.base.null", prefix)); } Object property = getProperty(bindings, context); if (property == null && strict) { throw new PropertyNotFoundException(LocalMessages.get("error.property.property.notfound", "null", base)); } return new ValueReference(base, property); }