Examples of ListType


Examples of org.yinwang.pysonar.types.ListType

    @NotNull
    @Override
    public Type transform(State s) {
        if (value != null) {
            return new ListType(transformExpr(value, s));
        } else {
            return Type.NONE;
        }
    }
View Full Code Here

Examples of org.yinwang.pysonar.types.ListType

     */
    @NotNull
    @Override
    public Type transform(State s) {
        resolveList(generators, s);
        return new ListType(transformExpr(elt, s));
    }
View Full Code Here

Examples of org.yinwang.pysonar.types.ListType

    @NotNull
    @Override
    public Type transform(State s) {
        if (elts.size() == 0) {
            return new ListType()// list<unknown>
        }

        ListType listType = new ListType();
        for (Node elt : elts) {
            listType.add(transformExpr(elt, s));
            if (elt instanceof Str) {
                listType.addValue(((Str) elt).value);
            }
        }

        return listType;
    }
View Full Code Here

Examples of org.yinwang.pysonar.types.ListType

    @Override
    public Type transform(State s) {
        for (Node d : dims) {
            transformExpr(d, s);
        }
        return new ListType();
    }
View Full Code Here

Examples of xbird.xquery.type.schema.ListType

                return EMPTY_SEQUENCE;
            } else if(size == 1) {
                return _exprs.get(0);
            } else {
                size = _exprs.size();
                ListType listtype = new ListType(size);
                for(int i = 0; i < size; i++) {
                    XQExpression analyzed = _exprs.get(i).staticAnalysis(statEnv);
                    _exprs.set(i, analyzed);
                    Type inferredType = analyzed.getType();
                    listtype.add(inferredType);
                }
                this._type = listtype;
            }
        }
        return this;
View Full Code Here

Examples of xbird.xquery.type.schema.ListType

            if(pos < 1) {
                throw new IllegalArgumentException("Illegal position: " + pos);
            }
            this.pos = pos;
            if(baseType instanceof ListType) {
                ListType list = ((ListType) baseType);
                int size = list.size();
                if(pos > size) {
                    // REVIEWME item seems to be not exist in the position
                    this._type = baseType.prime();
                    //this._type = SequenceType.EMPTY;
                } else {
                    int i = pos - 1;
                    this._type = list.get(i);
                }
            } else {
                this._type = baseType.prime();
            }
        }
View Full Code Here

Examples of xbird.xquery.type.schema.ListType

    private static final class LastFilter extends Instruction {
        private static final long serialVersionUID = 8332527761105927517L;

        public LastFilter(Type baseType) {
            if(baseType instanceof ListType) {
                ListType list = ((ListType) baseType);
                int size = list.size();
                if(size > 0) {
                    this._type = list.get(size - 1);
                } else {
                    // REVIEWME item seems to be not exist
                    this._type = baseType.prime();
                    //this._type = SequenceType.EMPTY;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.