A Reasonable C++ Wrappered Java Native Interface
Craig Bordelon
Abstract
A reasonable C++ Java Native Interface (JNI) technique termed C++ Wrappered JNI (C++WJ) is presented. The technique simplifies current error-prone JNI development by wrappering JNI calls. Provided development is done with the aid of a C++ compiler, C++WJ offers type checking and behind the scenes caching. A tool (jH) patterned on javah automates the creation of C++WJ classes. The paper presents the rationale behind the choices that led to C++WJ. Handling of Java class and interface hierarchy including Java type downcasts is discussed. Efficiency considerations in the C++WJ lead to two flavors of C++ classes: jtypes and Jtypes. A jtype is a lightweight less than full wrapper of a JNI object reference. A Jtype is a heavyweight full wrapper of a JNI object reference.
Create a lesson
Related papers
Spotlights: Discovering Improvement Opportunities in Software Repositories
Udi Barzelay, Ophir Azulai, Idan Friedman et al.
Assessing the Construct Validity of Object-Oriented, Class-Level Code Quality Metrics
Hera Arif, Miikka Kuutila, Paul Ralph
AdaRepair-Mem: Adaptive Experience Orchestration for Repository-Level Program Repair
Z. C. Luo, J. C. Guo, W. J. He et al.
HapCiD: Detecting API-related Compatibility Issues in OpenHarmony Apps
Daihang Chen, Yonghui Liu, Mingyi Zhou et al.
EviRCA: Decoupling Evidence Extraction from Reasoning for Microservice Root-Cause Analysis
Yuhao Wang, Zhen Qin, Xingliang Wang et al.
A Closed-Loop Control Architecture for Reliable Constraint Satisfaction in LLM Text Generation
Quan Zhou, Shahbaz Siddeeq, Mika Saari et al.