help-octave
[Top][All Lists]
Advanced

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

Re: java integration and reflection


From: Ernst Reissner
Subject: Re: java integration and reflection
Date: Tue, 02 Nov 2010 23:27:51 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Hi Michael,
you understood my question well..
Double is a bad example I must admit.
The main question was whether Matlabs does without reflection when using
the form x.method(...)
but no-one seems to know.

greetings.
Ernst
> 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]