public Vector getPlaceNames(){ return placeNameVector; } JSONArray array = new JSONArray(result); for(int x = 0; x < 3; x++){ JSONObject thisSet = array.getJSONObject(x); ListCreator placeNames = new ListCreator(); placeNames.addPlaceName(thisSet.getString("placename")); } placeNameVec.add(placeNames);
public Object getValue(Object ctx, Object elCtx, VariableResolverFactory variableFactory) { Object[] template = new Object[getValues().length]; for (int i = 0; i < getValues().length; i++) { template[i] = getValues()[i].getValue(ctx, elCtx, variableFactory); } return new ArrayList<Object>(Arrays.asList(template)); }
return new ListCreator(a); return new MapCreator(k, v); return new ArrayCreator(a, getSubComponentType(type)); if (returnType == null) returnType = Object.class; if (type.isArray()) { return new ExprValueAccessor((String) o, type, ctx, variableFactory, pCtx); return new ExprValueAccessor((String) o, Object.class, ctx, variableFactory, pCtx);
private EvaluatedExpression analyzeListCreation(ListCreator listCreator) { Method listCreationMethod = null; try { listCreationMethod = Arrays.class.getMethod("asList", Object[].class); } catch (NoSuchMethodException e) { } Invocation invocation = new MethodInvocation(listCreationMethod); ArrayCreationExpression arrayExpression = new ArrayCreationExpression(Object[].class); Accessor[] accessors = listCreator.getValues(); for (Accessor accessor : accessors) { ExecutableStatement statement = ((ExprValueAccessor)accessor).getStmt(); arrayExpression.addItem(statementToExpression(statement, Object.class)); } invocation.addArgument(arrayExpression); return new EvaluatedExpression(invocation); }
return new ListCreator(a); return new MapCreator(k, v); return new ArrayCreator(a, getSubComponentType(type)); if (returnType == null) returnType = Object.class; if (type.isArray()) { return new ExprValueAccessor((String) o, type, ctx, variableFactory, pCtx); return new ExprValueAccessor((String) o, Object.class, ctx, variableFactory, pCtx);
public Object getValue(Object ctx, Object elCtx, VariableResolverFactory variableFactory) { Object[] template = new Object[getValues().length]; for (int i = 0; i < getValues().length; i++) { template[i] = getValues()[i].getValue(ctx, elCtx, variableFactory); } return new ArrayList<Object>(Arrays.asList(template)); }
return new ListCreator(a); return new MapCreator(k, v); return new ArrayCreator(a, getSubComponentType(type)); if (returnType == null) returnType = Object.class; if (type.isArray()) { return new ExprValueAccessor((String) o, type, ctx, variableFactory, pCtx); return new ExprValueAccessor((String) o, Object.class, ctx, variableFactory, pCtx);