jpython casting to abstract java class
Christian Lemer
chris at ucmb.ulb.ac.be
Wed Jun 28 04:55:49 EDT 2000
On Tue, 27 Jun 2000, Douglas du Boulay wrote:
>
> >
> > Hi,
> > I have a small(ish) code fragment below which fails to
> > cast a python-subclass of an abstract-java-base-class back to that
> > java-base-class when it is passed as input to another
> > java (constuctor) method.
>
> Further testing suggests that the "abstract" word in the above is
> irrelevant. It should say:
>
> any JPython scripted class which inherits from, or subclasses a
> java based class cannot be cast back to that base class when
> passed back to another java based method requiring that
> base class type as an argument.
> (hope that makes sense)
Maybe I miss something, I'm quite new to java but have a two year
experience in Python.
Recently, I made a prototype of a query language tool for a Java
object-oriented database. My idea was to allow the end-user to extend the
query-language by writing some specific 'filters' and 'comparison
functions' from withing JPython. The database backend has to process some
algorithms using the filters and comparsion functionss.
For this I wrote some interfaces in java and implemented them by
subclassing them in python. I could then pass an instance of the
object from the jpython interpreter to the java filtering method
without any problem...
>
> I have no idea where to start looking to figure out where it is going
> astray. Help appreciated.
> Thanks again
> Doug
>
>
--
Christian Lemer
Service de Conformation des Macromolecules Biologiques et de Bioinformatique
Universite Libre de Bruxelles Brussels Free University
mailto:chris at ucmb.ulb.ac.be +32.2.648.52.00 http://www.ucmb.ulb.ac.be/~chris
PGP: 94 40 92 E5 BC 4A C0 B1 64 87 6E 11 58 71 B1 DD 56 F5 AF E7
More information about the Python-list
mailing list