+ CYJavaObject *self(CYGetJavaObject(context, _this));
+ JNIEnv *jni(self->value_);
+
+ CYJavaSignature bound(count);
+ for (auto overload(internal->overload_.lower_bound(bound)), e(internal->overload_.upper_bound(bound)); overload != e; ++overload) {
+ jvalue array[count];
+ if (!CYCastJavaArguments(jni, overload->shorty_, context, arguments, array))
+ continue;
+ switch (overload->primitive_) {
+ case CYJavaPrimitiveObject:
+ return CYCastJSValue(context, jni, _envcall(jni, CallObjectMethodA(self->value_, overload->method_, array)));
+ case CYJavaPrimitiveVoid:
+ _envcallv(jni, CallVoidMethodA(self->value_, overload->method_, array));
+ return CYJSUndefined(context);
+#define CYJavaForEachPrimitive_(T, t, Typ, Type, type) \
+ case CYJavaPrimitive ## Type: \
+ return CYJavaCastJSValue(context, _envcall(jni, Call ## Typ ## MethodA(self->value_, overload->method_, array)));
+CYJavaForEachPrimitive
+#undef CYJavaForEachPrimitive_
+ default: _assert(false);
+ }
+ }
+
+ CYThrow("invalid method call");
+} CYCatch(NULL) }
+
+static JSValueRef JavaStaticMethod_callAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef _this, size_t count, const JSValueRef arguments[], JSValueRef *exception) { CYTry {
+ CYJavaMethod *internal(reinterpret_cast<CYJavaMethod *>(JSObjectGetPrivate(object)));
+ CYJavaClass *table(CYGetJavaTable(context, _this));
+ JNIEnv *jni(table->value_);