public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver("$"); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); List list; if (constraintEx != null) { Object x = dataEx.getValue(ctx, thisValue, factory); if (!(x instanceof Collection)) throw new CompileException("was expecting type: Collection; but found type: " + (x == null ? "null" : x.getClass().getName())); list = new FastList(((Collection) x).size()); for (Object o : (Collection) x) { itemR.value = o; if ((Boolean) constraintEx.getValue(ctx, thisValue, itemFactory)) { list.add(subEx.getValue(o, thisValue, itemFactory)); } } } else { Object x = dataEx.getValue(ctx, thisValue, factory); if (!(x instanceof Collection)) throw new CompileException("was expecting type: Collection; but found type: " + (x == null ? "null" : x.getClass().getName())); list = new FastList(((Collection) x).size()); for (Object o : (Collection) x) { list.add(subEx.getValue(itemR.value = o, thisValue, itemFactory)); } } return list; }
public boolean isResolveable(String name) { return resolver.getName().equals(name) || (nextFactory != null && nextFactory.isResolveable(name)); }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver(item); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); if (iterCond instanceof Iterable) { for (Object o : (Iterable) iterCond) { itemR.setValue(o); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; int len = Array.getLength(iterCond); for (int i = 0; i < len; i++) { itemR.setValue(Array.get(iterCond, i)); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; itemR.setValue(o); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; int max = (Integer) iterCond + 1; for (int i = 1; i != max; i++) { itemR.setValue(i); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v;
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver(item); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); if (iterCond instanceof Iterable) { for (Object o : (Iterable) iterCond) { itemR.setValue(o); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; int len = Array.getLength(iterCond); for (int i = 0; i < len; i++) { itemR.setValue(Array.get(iterCond, i)); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; itemR.setValue(o); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; int max = (Integer) iterCond + 1; for (int i = 1; i != max; i++) { itemR.setValue(i); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v;
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver(item); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); int len = Array.getLength(iterCond); for (int i = 0; i < len; i++) { itemR.setValue(Array.get(iterCond, i)); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; case CHARSEQUENCE: for (Object o : iterCond.toString().toCharArray()) { itemR.setValue(o); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; int max = (Integer) iterCond + 1; for (int i = 1; i != max; i++) { itemR.setValue(i); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; itemR.setValue(o); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v;
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver(item); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); itemR.setValue(o); compiledBlock.getValue(ctx, thisValue, itemFactory); int len = Array.getLength(iterCond); for (int i = 0; i < len; i++) { itemR.setValue(Array.get(iterCond, i)); compiledBlock.getValue(ctx, thisValue, itemFactory); itemR.setValue(o); compiledBlock.getValue(ctx, thisValue, itemFactory); int max = (Integer) iterCond + 1; for (int i = 1; i != max; i++) { itemR.setValue(i); compiledBlock.getValue(ctx, thisValue, itemFactory);
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver(item); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); int len = Array.getLength(iterCond); for (int i = 0; i < len; i++) { itemR.setValue(Array.get(iterCond, i)); compiledBlock.getValue(ctx, thisValue, itemFactory); case CHARSEQUENCE: for (Object o : iterCond.toString().toCharArray()) { itemR.setValue(o); compiledBlock.getValue(ctx, thisValue, itemFactory); int max = (Integer) iterCond + 1; for (int i = 1; i != max; i++) { itemR.setValue(i); compiledBlock.getValue(ctx, thisValue, itemFactory); itemR.setValue(o); compiledBlock.getValue(ctx, thisValue, itemFactory);
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver(item); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); int len = Array.getLength(iterCond); for (int i = 0; i < len; i++) { itemR.setValue(Array.get(iterCond, i)); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; case CHARSEQUENCE: for (Object o : iterCond.toString().toCharArray()) { itemR.setValue(o); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; int max = (Integer) iterCond + 1; for (int i = 1; i != max; i++) { itemR.setValue(i); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v; itemR.setValue(o); v = compiledBlock.getValue(ctx, thisValue, itemFactory); if (itemFactory.tiltFlag()) return v;
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver("$"); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); List list; if (constraintEx != null) { Object x = dataEx.getValue(ctx, thisValue, factory); if (!(x instanceof Collection)) throw new CompileException("was expecting type: Collection; but found type: " + (x == null ? "null" : x.getClass().getName()), expr, start); list = new ArrayList(((Collection) x).size()); for (Object o : (Collection) x) { itemR.value = o; if ((Boolean) constraintEx.getValue(ctx, thisValue, itemFactory)) { list.add(subEx.getValue(o, thisValue, itemFactory)); } } } else { Object x = dataEx.getValue(ctx, thisValue, factory); if (!(x instanceof Collection)) throw new CompileException("was expecting type: Collection; but found type: " + (x == null ? "null" : x.getClass().getName()), expr, start); list = new ArrayList(((Collection) x).size()); for (Object o : (Collection) x) { list.add(subEx.getValue(itemR.value = o, thisValue, itemFactory)); } } return list; }
public Object getReducedValue(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver("$"); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); List list; if (constraintEx != null) { Object x = dataEx.getValue(ctx, thisValue, factory); if (!(x instanceof Collection)) throw new CompileException("was expecting type: Collection; but found type: " + (x == null ? "null" : x.getClass().getName()), expr, start); list = new ArrayList(((Collection) x).size()); for (Object o : (Collection) x) { itemR.value = o; if ((Boolean) constraintEx.getValue(ctx, thisValue, itemFactory)) { list.add(subEx.getValue(o, thisValue, itemFactory)); } } } else { Object x = dataEx.getValue(ctx, thisValue, factory); if (!(x instanceof Collection)) throw new CompileException("was expecting type: Collection; but found type: " + (x == null ? "null" : x.getClass().getName()), expr, start); list = new ArrayList(((Collection) x).size()); for (Object o : (Collection) x) { list.add(subEx.getValue(itemR.value = o, thisValue, itemFactory)); } } return list; }
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver("$"); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); List list; if (constraintEx != null) { Collection col = ((Collection) dataEx.getValue(ctx, thisValue, factory)); list = new FastList(col.size()); for (Object o : col) { itemR.value = o; if ((Boolean) constraintEx.getValue(ctx, thisValue, itemFactory)) { list.add(subEx.getValue(o, thisValue, itemFactory)); } } } else { Collection col = ((Collection) dataEx.getValue(ctx, thisValue, factory)); list = new FastList(col.size()); for (Object o : col) { list.add(subEx.getValue(itemR.value = o, thisValue, itemFactory)); } } return list; }
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver("$"); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); List list; if (constraintEx != null) { Collection col = ((Collection) dataEx.getValue(ctx, thisValue, factory)); list = new ArrayList(col.size()); for (Object o : col) { itemR.value = o; if ((Boolean) constraintEx.getValue(ctx, thisValue, itemFactory)) { list.add(subEx.getValue(o, thisValue, itemFactory)); } } } else { Collection col = ((Collection) dataEx.getValue(ctx, thisValue, factory)); list = new ArrayList(col.size()); for (Object o : col) { list.add(subEx.getValue(itemR.value = o, thisValue, itemFactory)); } } return list; }
public Object getReducedValueAccelerated(Object ctx, Object thisValue, VariableResolverFactory factory) { ItemResolverFactory.ItemResolver itemR = new ItemResolverFactory.ItemResolver("$"); ItemResolverFactory itemFactory = new ItemResolverFactory(itemR, new DefaultLocalVariableResolverFactory(factory)); List list; if (constraintEx != null) { Collection col = ((Collection) dataEx.getValue(ctx, thisValue, factory)); list = new ArrayList(col.size()); for (Object o : col) { itemR.value = o; if ((Boolean) constraintEx.getValue(ctx, thisValue, itemFactory)) { list.add(subEx.getValue(o, thisValue, itemFactory)); } } } else { Collection col = ((Collection) dataEx.getValue(ctx, thisValue, factory)); list = new ArrayList(col.size()); for (Object o : col) { list.add(subEx.getValue(itemR.value = o, thisValue, itemFactory)); } } return list; }
public boolean isResolveable(String name) { return resolver.getName().equals(name) || (nextFactory != null && nextFactory.isResolveable(name)); }
public boolean isTarget(String name) { return resolver.getName().equals(name); }
public boolean isTarget(String name) { return resolver.getName().equals(name); }
public boolean isResolveable(String name) { return resolver.getName().equals(name) || (nextFactory != null && nextFactory.isResolveable(name)); }
public boolean isTarget(String name) { return resolver.getName().equals(name); }
public VariableResolver createVariable(String name, Object value) { if (isTarget(name)) { resolver.setValue(value); return resolver; } else { return nextFactory.createVariable(name, value); } }
public VariableResolver createVariable(String name, Object value) { if (isTarget(name)) { resolver.setValue(value); return resolver; } else { return nextFactory.createVariable(name, value); } }