What's Changed
- Renamed the module to
java-bridge
- Bumped the required node.js version to 15
- Set the target version of the java library to 1.8
- Added an instanceOf method to class instances:
import { importClass } from 'java-bridge';
const JavaString = importClass('java.lang.String');
const str = new JavaString('Hello World');
// Pass the class to check against as the argument
str.instanceOf(JavaString); // true
// You can also pass the name of the class to check against
str.instanceOf('java.lang.String'); // true
str.instanceOf('java.lang.Object'); // true
str.instanceOf('java.util.List'); // false
Full Changelog: v2.0.1...v2.1.0