public PropertyAccess()

in src/main/java/org/apache/sling/scripting/sightly/compiler/expression/nodes/PropertyAccess.java [61:75]


    public PropertyAccess(ExpressionNode target, Iterable<String> properties) {
        String lastProp = null;
        ExpressionNode result = target;
        for (String property : properties) {
            if (lastProp != null) {
                result = new PropertyAccess(result, new StringConstant(lastProp));
            }
            lastProp = property;
        }
        if (lastProp == null) {
            throw new IllegalArgumentException("The list of properties must be non-empty");
        }
        this.target = result;
        this.property = new StringConstant(lastProp);
    }