All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.python.core.PyCode Maven / Gradle / Ivy

Go to download

Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrated with the Java platform. It thus allows you to run Python on any Java platform.

There is a newer version: 2.7.4
Show newest version
// Copyright (c) Corporation for National Research Initiatives
package org.python.core;

/**
 * A super class for all python code implementations.
 */
public abstract class PyCode extends PyObject
{
    public String co_name;

    abstract public PyObject call(ThreadState state, PyFrame frame, PyObject closure);

    public PyObject call(PyFrame frame) {
        return call(Py.getThreadState(), frame);
    }

    public PyObject call(ThreadState state, PyFrame frame) {
        return call(state, frame, null);
    }

    abstract public PyObject call(ThreadState state,
                                  PyObject args[], String keywords[],
                                  PyObject globals, PyObject[] defaults,
                                  PyObject closure);

    abstract public PyObject call(ThreadState state,
                                  PyObject self, PyObject args[],
                                  String keywords[],
                                  PyObject globals, PyObject[] defaults,
                                  PyObject closure);

    abstract public PyObject call(ThreadState state,
                                  PyObject globals, PyObject[] defaults,
                                  PyObject closure);

    abstract public PyObject call(ThreadState state,
                                  PyObject arg1, PyObject globals,
                                  PyObject[] defaults, PyObject closure);

    abstract public PyObject call(ThreadState state,
                                  PyObject arg1, PyObject arg2,
                                  PyObject globals, PyObject[] defaults,
                                  PyObject closure);

    abstract public PyObject call(ThreadState state,
                                  PyObject arg1, PyObject arg2, PyObject arg3,
                                  PyObject globals, PyObject[] defaults,
                                  PyObject closure);

    abstract public PyObject call(ThreadState state,
                                  PyObject arg1, PyObject arg2, PyObject arg3, PyObject arg4,
                                  PyObject globals, PyObject[] defaults,
                                  PyObject closure);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy