Hi Magnus,
thanks a lot but the actual resulting class is

org.python.core.PyArray

which is the wrapper class for java array I guess ...

Nicola

Magnus.Lambert@ppm.nu wrote:
Check http://www.jython.org/docs/jarray.html , see examples at the bottom of
the page.

  
from java.lang import Integer
from jarray import zeros, array
i = zeros(3, Integer)				# Integer i[] = new
        
Integer[3];
  
i = array([], Integer).__class__		# Class i = Integer[].class
        

// Magnus

-----Ursprungligt meddelande-----
Från: Nicola de Candussio [mailto:ndecandu@rssd.esa.int] 
Skickat: den 3 februari 2004 10:00
Till: jython-users@lists.sourceforge.net
Ämne: [Jython-users] Array class instances


Hi all,

do you now if it is possible to generate the equivalent of this java 
declaration

Class i = Integer[].class

in jython ??
i.e. is it possible to generate instances of  java.lang.Class ? the
following

from java.lang import Integer
i = Integer[]

does not work .....

Trying to get an object of that type and access its class definition 
does not work either

from java.lang.reflect import Array
a = Array.newInstance(Integer, 1)
# NO !!
a.getClass()

any suggestion ???

Thanks in advance


Nicola



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the
breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Jython-users mailing list
Jython-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jython-users