Wrappers¶
Synopsis¶
This module is a set of of classes which wrap jclass and jobject values, so they can be accessed approximately the same way as Python classes and objects.
- Each jni.JNIEnv object must be tied to the local thread. So this module has an object ThreadEnv, which is a thread-specific “singleton”. There is one instance per thread.
- Each ThreadEnv object contains a list of classes called classes.
- Each value is a Python wrapper for the class which wraps the jclass, mapping Java methods and fields to the class.
- If a jobject is encountered, it can be wrapped with an Instance of the class, which is a nested class of the class.
For example: