KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > python > core > PyJavaInnerClass


1 // Copyright (c) Corporation for National Research Initiatives
2
package org.python.core;
3
4
5 /**
6  * A wrapper around a java inner class.
7  */

8
9 public class PyJavaInnerClass extends PyJavaClass
10 {
11     public PyJavaClass parent = null;
12
13     public PyJavaInnerClass(Class JavaDoc c, PyJavaClass parent) {
14         super(c);
15         this.parent = parent;
16         String JavaDoc pname = parent.__name__;
17         __name__ = pname + "." + __name__.substring(pname.length() + 1);
18     }
19
20     PyObject lookup(String JavaDoc name, boolean stop_at_java) {
21         PyObject result = super.lookup(name, stop_at_java);
22         if (result != null)
23             return result;
24         return parent.lookup(name, stop_at_java);
25     }
26 }
27
Popular Tags