class AbstractExpressionEvaluator implements ExpressionEvaluator {

    protected List<Object> createAndFillList(ArrayNode json, List<Object> toReturn, String className, List<String> genericClasses) {
        for (JsonNode node : json) {
            if (isSimpleTypeNode(node)) {
                String generic = genericClasses.get(genericClasses.size() - 1);
                Object value = internalLiteralEvaluation(getSimpleTypeNodeTextValue(node), generic);
                toReturn.add(value);
            } else {
                String genericClassName = ScenarioSimulationSharedUtils.isMap(className) ? className : genericClasses.get(genericClasses.size() - 1);
                Object listElement = createObject(genericClassName, genericClasses);
                Object returnedObject = createAndFillObject((ObjectNode) node, listElement, genericClassName, genericClasses);
                toReturn.add(returnedObject);
            }
        }
        return toReturn;
    }

}