Re: overloading JNI return values

From: Date: Tue, 29 Jun 1999 18:03:01 +0000
Subject: Re: overloading JNI return values
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-7818@lists.php.net to get a copy of this message
Isn't there a way to find out the return type of a method using its name? With the reflection APIs in Java, I would assume something like that is available. Jim Brian Schaffner wrote: > > i've got a handle on the zend external API now .... > > the latest question is: > > the java nata interface API expects you to know the return type for > the methods that you invoke on a particular java class. in fact, it expects > you to use something like this: > > CallStaticVoidMethod() > CallStaticBooleanMethod() > CallObjectMethod() > CallFloatMethod() > CallNonvirtualIntMethod() > CallNonvirtualLongMethod() > > so, if within PHP we do: > > $x = new JAVA("MyClass"); > $y = $x->MyMethod(); > > how do we know which JNI function to use? the only things I can think of > seem like hacks: > > $y = (int) $x->MyMethod(); > $y = $x->iMyMethod(); > $y = $x->MyMethod(...,"int") > > anybody got an idea here? > > -brian-

« previous php.dev (#7818) next »