Commit Graph

58 Commits

Author SHA1 Message Date
tshirtman 208806f635 add support for multiple signatures, add various tests 2013-01-03 01:19:49 +01:00
Mathieu Virbel a2d0076e56 added convert_python_to_jobject: don't do convert to java primitive/jvalue, but jobject. fixed array translation. 2013-01-02 18:11:12 +01:00
Mathieu Virbel 143ab371b6 more work on the proxy, better argument conversion. shuffle() works on array <= 3. with 9 argument, it seem to call toArray(), and argument conversion is not great for [I 2013-01-02 13:57:08 +01:00
Mathieu Virbel 8915e9d558 debug 2013-01-02 12:18:44 +01:00
Mathieu Virbel 9838ac9282 fix for always returning an Object from invoke(). If it's a native primitive, create the corresponding native java.lang.<type>.
The current conversion is only for: int (java.lang.Long), bool (java.lang.Boolean), float (java.lang.Double).
+ remove debug
2013-01-02 12:18:30 +01:00
Mathieu Virbel f12abcbc88 add auto conversion for java.lang.Long/Integer/Float/Double/Short/Boolean/Byte/Character 2013-01-02 12:16:51 +01:00
Mathieu Virbel dcfe369f1e various fix for java/python implementation. It finally start working, but still lot to do.
Use: make testimplem, and check the jnius/jnius_utils.pxi:test() function.
2012-12-31 05:15:09 +01:00
tshirtman 9b758a81c3 some clarifications for java classes extended support 2012-12-31 00:15:25 +01:00
Gabriel 5d143331a8 put NativeInvocationHandler in jnius java package 2012-12-25 01:07:59 +01:00
Gabriel 21a6e0d4ce some progress on proxy/invocation handler for wrapping python classes in java 2012-12-25 01:07:00 +01:00
Gabriel 70fa391458 Merge branch 'master' into extend_class_support 2012-12-23 17:02:17 +01:00
Mathieu Virbel f03dfdf886 -always- release the arrays, whatever is the iscopy boolean. According to the documentation, "The result is valid until the corresponding Release<PrimitiveType>ArrayElements() function is called". The iscopy boolean serve just for another case: "Since the returned array may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until Release<PrimitiveType>ArrayElements() is called.Since the returned array may be a copy of the Java array, changes made to the returned array will not necessarily be reflected in the original array until Release<PrimitiveType>ArrayElements() is called." 2012-12-21 03:52:59 +01:00
Amirouche Boubekki fcfb1e64a8 added support for Python class as parameter of java methods that takes Java Class object as parameter 2012-10-14 23:00:19 +02:00
Amirouche Boubekki c216057647 convert arrays returned as Java Object to python list 2012-10-01 02:20:58 +02:00
Amirouche Boubekki 4a6945accd convert list of integer, float and long to their equivalent Java Array object 2012-10-01 01:30:51 +02:00
Amirouche Boubekki 20b4bd5d62 allow to use python list and tuple as Object params 2012-10-01 01:21:24 +02:00
Amirouche Boubekki 78a68134ae no need to raise an exception here 2012-10-01 01:16:57 +02:00
Amirouche Boubekki b8ee0f8ab5 fix method resolution when they are varargs 2012-09-30 22:39:38 +02:00
Amirouche Boubekki c58de98b8a no need to recompute return and args definition 2012-09-30 21:50:19 +02:00
Amirouche Boubekki 65d3d9bc12 use of iteritems to retrieve key and value 2012-09-30 21:48:58 +02:00
tshirtman 52aea7efb8 start to add native invocation handler
+fix badly formated string
2012-09-16 00:45:32 +02:00
tshirtman 82b703c0c1 Merge branch 'master' into extend_class_support
Conflicts:
	jnius/jnius_export_class.pxi
2012-09-06 17:48:25 +02:00
Gabriel Pettier 4ff916dfdf Merge pull request #24 from apalala/classpath
Allow for '*' wildcards in CLASSPATH+(some tipos).
2012-09-06 05:47:49 -07:00
tshirtman 7ac9bcd3d7 partial work on extending java classes from python
non-functionnal!
2012-09-06 14:19:45 +02:00
gabriel.pettier 858bff6e25 varargs works!
at least for printf, and probably for other methods accepting Strings

need more tests cases!
2012-08-26 17:52:19 +02:00
gabriel.pettier 708b2d075f Doesn't break the tests anymore, add test for varargs, not passing (yet) 2012-08-26 15:53:11 +02:00
gabriel.pettier 17258f100d work on varargs support 2012-08-26 02:51:22 +02:00
Juancarlo Añez 9bd899e371 Allow for '*' wildcards in CLASSPATH+(some tipos). 2012-08-25 10:24:48 -04:30
Juancarlo Añez 93109ccab5 Make the desktop use CLASSPATH if defined. 2012-08-21 14:22:37 -04:30
Mathieu Virbel e3a2965810 bump to 1.1-dev 2012-08-20 18:48:22 +02:00
Mathieu Virbel f9c63fd186 set version to 1.0 2012-08-20 18:47:44 +02:00
Mathieu Virbel 61855a4f12 fixes 2012-08-20 16:51:32 +02:00
Mathieu Virbel 35ef6575d8 when calculating the score, check the assignable from too, and return -1 if the check doesn't work. 2012-08-20 11:09:02 +02:00
Mathieu Virbel 79b564a338 renaming to JavaMultipleMethod. 2012-08-20 11:08:32 +02:00
Mathieu Virbel 77f2928e0b fixes for subclasses. closes #3 2012-08-20 10:34:14 +02:00
Mathieu Virbel 4730c2b802 reorder functions 2012-08-20 09:40:18 +02:00
Mathieu Virbel 7bd35411bf split jnius.pyx 2012-08-20 09:35:14 +02:00
gabriel.pettier 6aa4760721 Merge branch 'master' of github.com:kivy/pyjnius 2012-08-18 19:35:26 +02:00
gabriel.pettier 6d2df26f0b small grammar fix 2012-08-18 19:34:16 +02:00
gabriel.pettier 9ec504dfd6 change to getMethods and getFields to get inherited methods/fields too
and small doc fix
2012-08-18 19:32:15 +02:00
Mathieu Virbel f8fc0e714a Merge branch 'master' of github.com:kivy/pyjnius 2012-08-18 12:59:32 +02:00
Mathieu Virbel 60ee14ed6f add the previous tests from python-for-android/javawrapper branch.
+ fix findclass (need cleaning)
+ fix array return with chars
+ export reflect module by default (it's already used in jnius so..)
2012-08-18 12:59:15 +02:00
gabriel.pettier 2eea0f45d3 fix grammar errors in some comments 2012-08-18 11:21:14 +02:00
Mathieu Virbel bb0923d77d fix System.out.println('hello') crash due to a race condition: the instancatied JavaClass for "out" was deallocated before the __call__ of the println. >_< 2012-08-18 04:14:53 +02:00
Dominik Kozaczko d3f948bf30 __doc__ fixed :) 2012-08-16 14:12:10 +02:00
Mathieu Virbel 774fc295e9 add cast(classname, obj) method to be able to use an instance from another class def 2012-08-16 00:16:17 +02:00
Mathieu Virbel 7eecc34237 fix autoclass when return 2012-08-15 23:36:40 +02:00
Mathieu Virbel 2c2adefb6a lazy methods and fields loading. 2012-08-15 23:28:53 +02:00
Mathieu Virbel 7721b70c46 always convert the return with autoclass() 2012-08-15 21:54:53 +02:00
Mathieu Virbel 77139529ad add support for multiple signatures on constructors and methods. 2012-08-15 19:16:39 +02:00