Java API generator

Scapix Java API generator (scapix_java executable in bin folder) is a separate optional component, independent from Scapix Language Bridge generator. It is used to generate C++ wrapper header files from Java binary .class files. Pre-generated C++ wrapper headers for jdk-11.0.2 and android-28 APIs are included in scapix package (folder scapix/java_api/) and you can use scapix_java utility to generate C++ headers for another JDK or Android release or for any other Java code.

See generated header example: java/lang/String.h

Using Scapix Java API example:

#include <scapix/java_api/java/lang/System.h>
#include <scapix/java_api/java/util/Locale.h>
#include <scapix/java_api/java/text/DateFormatSymbols.h>

using namespace scapix::link::java;
using namespace scapix::java_api;

void test()
{
    // C++ objects are automatically converted to and from corresponding Java types.
    // This works for any type supported by scapix::link::java::convert<> interface,
    // which supports many STL types and can be extended for your own types.

    std::string version = java::lang::System::getProperty("java.version");
    std::vector<std::string> languages = java::util::Locale::getISOLanguages();
    std::vector<std::vector<std::string>> zone_strings = java::text::DateFormatSymbols::getInstance()->getZoneStrings();
    std::map<std::string, std::string> properties = java::lang::System::getProperties();
}