Package org.python.compiler

Examples of org.python.compiler.JavaMaker


        PyObject mn=dict.__finditem__("__module__");
        if (mn==null)
            pythonModuleName = "foo";
        else
            pythonModuleName = (String)mn.__tojava__(String.class);
        JavaMaker jm = new JavaMaker(superclass, interfaces, className,
                                     pythonModuleName, fullProxyName, dict);
        try {
            jm.build();
            ByteArrayOutputStream bytes = new ByteArrayOutputStream();
            jm.classfile.write(bytes);
            Py.saveClassFile(fullProxyName, bytes);

            return makeClass(superclass, vinterfaces, jm.myClass, bytes);
View Full Code Here


        if (mn == null) {
            pythonModuleName = "foo";
        } else {
            pythonModuleName = (String) mn.__tojava__(String.class);
        }
        JavaMaker jm = new JavaMaker(superclass, interfaces, className, pythonModuleName, fullProxyName, dict);
        try {
            jm.build();
            ByteArrayOutputStream bytes = new ByteArrayOutputStream();
            jm.classfile.write(bytes);
            Py.saveClassFile(fullProxyName, bytes);

            return makeClass(superclass, vinterfaces, jm.myClass, bytes);
View Full Code Here

        if (mn == null) {
            pythonModuleName = "foo";
        } else {
            pythonModuleName = (String) mn.__tojava__(String.class);
        }
        JavaMaker jm = new JavaMaker(superclass,
                                     interfaces,
                                     className,
                                     pythonModuleName,
                                     fullProxyName,
                                     dict);
        try {
            ByteArrayOutputStream bytes = new ByteArrayOutputStream();
            jm.build(bytes);
            Py.saveClassFile(fullProxyName, bytes);

            return makeClass(superclass, vinterfaces, jm.myClass, bytes);
        } catch (Exception exc) {
            throw Py.JavaError(exc);
View Full Code Here

TOP

Related Classes of org.python.compiler.JavaMaker

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.