Package org.python.core

Examples of org.python.core.ArgParser


        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Num___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Num", args, keywords, new String[]
            {"n", "lineno", "col_offset"}, 1, true);
        setN(ap.getPyObject(0, Py.None));
        int lin = ap.getInt(1, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(2, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here


        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Module___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Module", args, keywords, new String[]
            {"body"}, 1, true);
        setBody(ap.getPyObject(0, Py.None));
    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Dict___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Dict", args, keywords, new String[]
            {"keys", "values", "lineno", "col_offset"}, 2, true);
        setKeys(ap.getPyObject(0, Py.None));
        setValues(ap.getPyObject(1, Py.None));
        int lin = ap.getInt(2, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(3, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        super(subType);
    }
    @ExposedNew
    @ExposedMethod
    public void Break___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Break", args, keywords, new String[]
            {"lineno", "col_offset"}, 0, true);
        int lin = ap.getInt(0, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(1, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Expression___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Expression", args, keywords, new String[]
            {"body"}, 1, true);
        setBody(ap.getPyObject(0, Py.None));
    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void TryExcept___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("TryExcept", args, keywords, new String[]
            {"body", "handlers", "orelse", "lineno", "col_offset"}, 3, true);
        setBody(ap.getPyObject(0, Py.None));
        setHandlers(ap.getPyObject(1, Py.None));
        setOrelse(ap.getPyObject(2, Py.None));
        int lin = ap.getInt(3, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(4, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Exec___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Exec", args, keywords, new String[]
            {"body", "globals", "locals", "lineno", "col_offset"}, 3, true);
        setBody(ap.getPyObject(0, Py.None));
        setGlobals(ap.getPyObject(1, Py.None));
        setLocals(ap.getPyObject(2, Py.None));
        int lin = ap.getInt(3, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(4, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Slice___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Slice", args, keywords, new String[]
            {"lower", "upper", "step"}, 3, true);
        setLower(ap.getPyObject(0, Py.None));
        setUpper(ap.getPyObject(1, Py.None));
        setStep(ap.getPyObject(2, Py.None));
    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void While___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("While", args, keywords, new String[]
            {"test", "body", "orelse", "lineno", "col_offset"}, 3, true);
        setTest(ap.getPyObject(0, Py.None));
        setBody(ap.getPyObject(1, Py.None));
        setOrelse(ap.getPyObject(2, Py.None));
        int lin = ap.getInt(3, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(4, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

        this(TYPE);
    }
    @ExposedNew
    @ExposedMethod
    public void Attribute___init__(PyObject[] args, String[] keywords) {
        ArgParser ap = new ArgParser("Attribute", args, keywords, new String[]
            {"value", "attr", "ctx", "lineno", "col_offset"}, 3, true);
        setValue(ap.getPyObject(0, Py.None));
        setAttr(ap.getPyObject(1, Py.None));
        setCtx(ap.getPyObject(2, Py.None));
        int lin = ap.getInt(3, -1);
        if (lin != -1) {
            setLineno(lin);
        }

        int col = ap.getInt(4, -1);
        if (col != -1) {
            setLineno(col);
        }

    }
View Full Code Here

TOP

Related Classes of org.python.core.ArgParser

Copyright © 2018 www.massapicom. 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.