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

org.python.core.PyJavaInnerClass 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 wrapper around a java inner class.
 */

public class PyJavaInnerClass extends PyJavaClass
{
    public PyJavaClass parent = null;

    public PyJavaInnerClass(Class c, PyJavaClass parent) {
        super(c);
        this.parent = parent;
        String pname = parent.__name__;
        __name__ = pname + "." + __name__.substring(pname.length() + 1);
    }

    PyObject lookup(String name, boolean stop_at_java) {
        PyObject result = super.lookup(name, stop_at_java);
        if (result != null)
            return result;
        return parent.lookup(name, stop_at_java);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy