[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/wshackle/java4cpp/java4cpp-1.3/src/main/resources/cpp_new.cpp [Back]  [Original]

//%%%% Lines beginning with "//%%%%" are template comments and removed from final output.
//%%%% "%NAMESPACE%" will be replaced with namespace
//%%%% "%HEADER%" will be replaced with header
//%%%% "%HEADER_DEFINE%" will be replaced with defined value used to prevent multiple inclusion
//%%%% "%CLASS_NAME%" will be replaced with className (not including package)
//%%%% "%JNI_SIGNATURE% will be replaced with the JNI signature for the constructor.
//%%%% "%CONSTRUCTOR_ARGS% will be replaced with the actual Constructors arguments
JNIEnv *env =getEnv();
static jclass cls = get%CLASS_NAME%Class();
if (cls != NULL) {
    static jmethodID mid = env->GetMethodID(cls, "", "%JNI_SIGNATURE%");
    if (NULL == mid) {
        std::cerr ExceptionOccurred();
        if(t != NULL) {
            if(GetDebugJ4Cpp()) {
                DebugPrintJObject(__FILE__,__LINE__," %CLASS_NAME%::%METHOD_NAME% jthis=",t);
                env->ExceptionDescribe();
            }
            throw t;
        }
        if(jthis == NULL) {
            std::cerr NewGlobalRef(jthis);
        }
    }
}
releaseEnv(env);

Web Proxy Viewer  |  New URL  |  Original Page