The proposed solution alters the JNI environment structure
by including a hash map to store the recently accessed field
identifiers and methods. It also caches the class structure in the
JNI environment structure. A new method is introduced to pin
objects to their current memory location so that the same
addresses can be used in future accesses. This decreases the
time of referencing the objects and avoid additional calls to JNI
as we already know its location in the memory.