01: // Copyright (c) Corporation for National Research Initiatives
02: package org.python.core;
03:
04: /**
05: * A wrapper around a java inner class.
06: */
07:
08: public class PyJavaInnerClass extends PyJavaClass {
09: public PyJavaClass parent = null;
10:
11: public PyJavaInnerClass(Class c, PyJavaClass parent) {
12: super (c);
13: this .parent = parent;
14: String pname = parent.__name__;
15: __name__ = pname + "." + __name__.substring(pname.length() + 1);
16: }
17:
18: PyObject lookup(String name, boolean stop_at_java) {
19: PyObject result = super.lookup(name, stop_at_java);
20: if (result != null)
21: return result;
22: return parent.lookup(name, stop_at_java);
23: }
24: }
|