I have a class called PyJavaObject which is a wrapper class around java
object. The code looks like this.
class PyJavaObject(PyObject):
def __init__(self, object):
self.object = object
PyObject.__init__(self)
self.initialized = 1
def __tojava__(self, clazz):
if clazz == PyObject:
return self
return self.object
Let say i have few java classes A, B and C.
public class A {
...
}
public class B {
...
}
public class C {
public C (A) {
...
}
public C (B) {
...
}
}
what should happen when i try to create an object of type C from jython like
this
pyA = PyJavaObject(A())
c = C(pyA)
How will jython identifies which constructor to call?
--
View this message in context: http://www.nabble.com/Wrapper-around-java-objects-tp22821836p22821836.html
Sent from the jython-users mailing list archive at Nabble.com.
|