help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: java integration and reflection


From: Michael Goffioul
Subject: Re: java integration and reflection
Date: Tue, 2 Nov 2010 22:18:59 +0000

On Tue, Nov 2, 2010 at 5:40 PM, Ernst Reissner <address@hidden> wrote:
> Hi all, Hi Michael, ,
> as Michael/you told me, the java-integration package uses reflection.
> So java_new('java.lang.Double', '4) invokes new Double(4)
> He told me that invoking constructor methods on instances of Double like
> Double.valueOf(4) does not help because internally reflection is used
> again.
> Does this apply to octave only or also to Matlab.
> I can imagine for Matlab this is different because it is written in Java.

I'm not sure I fully understand your question...
Octave java does indeed perform internal conversions for well known types
when there's an equivalent: java.lang.Double <-> double,
java.lang.String <-> char array...
So ava_new('java.lang.Double', 4) is useless because the returned object will be
immediately reconverted back to an octave double.

I have now idea how Matlab works for such situation.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]