Re: [PHP-DEV] overloading JNI return values From: Jim Winstead (jimw <email protected>)
Date: 06/29/99

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-

-- 
PHP Development Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>