summaryrefslogtreecommitdiff
path: root/unix/modjni.c
AgeCommit message (Collapse)Author
2017-08-13all: Raise exceptions via mp_raise_XXXJavier Candeira
- Changed: ValueError, TypeError, NotImplementedError - OSError invocations unchanged, because the corresponding utility function takes ints, not strings like the long form invocation. - OverflowError, IndexError and RuntimeError etc. not changed for now until we decide whether to add new utility functions.
2017-07-31all: Use the name MicroPython consistently in commentsAlexander Steffen
There were several different spellings of MicroPython present in comments, when there should be only one.
2017-07-30unix/modjni: Convert to mp_rom_map_elem_t.Paul Sokolovsky
2017-06-15all: Make more use of mp_raise_{msg,TypeError,ValueError} helpers.Damien George
2017-01-04all: Consistently update signatures of .make_new and .call methods.Paul Sokolovsky
Otherwise, they serve reoccurring source of copy-paste mistakes and breaking nanbox build.
2016-09-22all: Remove 'name' member from mp_obj_module_t struct.Damien George
One can instead lookup __name__ in the modules dict to get the value.
2016-09-18unix/modjni: array(): Support creation of object arrays.Paul Sokolovsky
2016-09-17unix/modjni: Add array() top-level function to create Java array.Paul Sokolovsky
Takes element primitive type encoded as a char per standard JNI encoding, and array size. TODO: Support object arrays.
2016-09-16unix/modjni: Implement subscription for object arrays.Paul Sokolovsky
2015-11-11unix/modjni: Add missing get_jclass_name() function.Paul Sokolovsky
2015-10-23unix/modjni: Actually check argument type when doing method resolution.Paul Sokolovsky
This is required to properly select among overloaded methods. It however relies on java.lang.Object-overloaded method to come last, which appears to be the case for OpenJDK.
2015-10-22unix/modjni: Don't pass Java object to a method which doesn't expect it.Paul Sokolovsky
For example, don't pass Integer to double method. This is still not selective enough to choose the right overloaded method maong those taking objects.
2015-10-14unix/modjni: Add iteration support for Java List objects.Paul Sokolovsky
Using generic iteration-via-subscription support (TODO: factor it out for reuse).
2015-10-14unix/modjni: call_method: Check for Java exception after method return.Paul Sokolovsky
2015-10-11py: Rename MP_BOOL() to mp_obj_new_bool() for consistency in naming.Paul Sokolovsky
2015-10-10unix/modjni: py2jvalue: Support bool and None values.Paul Sokolovsky
2015-10-09unix/modjni: jvalue2py() is currently not used.Paul Sokolovsky
Not remove so far, may be needed later.
2015-10-08unix/modjni: Allow to access fields of objects.Paul Sokolovsky
2015-10-07unix/modjni: After Call*Method(), Java exception should always be checked.Paul Sokolovsky
OpenJDK seemed to return NULL in case of exception, but Dalvik returns arbitrary value, so skip such "optimizations".
2015-10-04unix/modjni: jclass.__str__/__repr__: Return Java .toString() value.Paul Sokolovsky
2015-10-03unix/modjni: jobject.__str__/__repr__: Return Java .toString() value.Paul Sokolovsky
2015-10-02unix/modjni: Convert Java's IndexOutOfBoundsException to Python's IndexError.Paul Sokolovsky
2015-10-01unix/modjni: Propagate Java exceptions on list access.Paul Sokolovsky
2015-09-30unix/modjni: Fix method argument matching.Paul Sokolovsky
2015-09-29unix/modjni: Implement len() for objects with java.util.List interface.Paul Sokolovsky
2015-09-28unix/modjni: call_method: Delete done local references in loop.Paul Sokolovsky
To avoid local ref table overflow.
2015-09-27unix/modjni: call_method: Better resource release.Paul Sokolovsky
2015-09-26unix/modjni: call_method(): If name doesn't match, cleanup via goto next_method.Paul Sokolovsky
2015-09-26unix/modjni: Need to really use per-rettype Call*Method functions.Paul Sokolovsky
2015-09-24unix/modjni: new_jobject(): Handle null reference.Paul Sokolovsky
2015-09-23unix/modjni: Factor out is_object_type().Paul Sokolovsky
2015-09-22unix/modjni: Move type analysis logic to new_jobject(), for reuse.Paul Sokolovsky
2015-09-21unix/modjni: Support for subscripting of Java lists (r/o so far).Paul Sokolovsky
2015-09-20unix/modjni: jvalue2py: Handle boolean.Paul Sokolovsky
2015-09-19unix/modjni: py2jvalue: Pass jobject's down to Java.Paul Sokolovsky
So far, no signature check is done (TODO).
2015-09-18unix/modjni: py2jvalue: Handle both int and long java types (with TODO for ↵Paul Sokolovsky
long).
2015-09-17unix/modjni: jvalue2py: Handle class-containing jvalues.Paul Sokolovsky
2015-09-16unix/modjni: Add env() module function.Paul Sokolovsky
Useful to load native method libraries not loaded by VM (as happens on Android).
2015-09-15unix/modjni: Return any object type value as a jobject.Paul Sokolovsky
2015-09-14unix/modjni: Return Java null as Python None.Paul Sokolovsky
2015-09-14unix/modjni: Support static methods.Paul Sokolovsky
2015-09-13unix/modjni: Factor out new_jobject(), jvalue2py() functions.Paul Sokolovsky
2015-09-12unix/modjni: Factor out py2jvalue() function.Paul Sokolovsky
2015-09-11unix/modjni: "jni" module to interface to JNI-compliant JavaVM.Paul Sokolovsky
This includes Android Dalvik VM for example. Example usage: import jni System = jni.cls("java/lang/System") System.out.println("Hello, Java!")