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.

  1. 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.
  2. Each ThreadEnv object contains a list of classes called classes.
  3. Each value is a Python wrapper for the class which wraps the jclass, mapping Java methods and fields to the class.
  4. 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:

API Reference