Tue 23 Aug 2016 08:11:46 PM UTC, comment #10:
Ah little appendix:
documentation:
I read:
'If the argument is an object, return the underlying struct.'
should be replaced by
'If the argument is an Octave object or a Java object,
return the underlying struct.'
Maybe a word on static fields.
|
Tue 23 Aug 2016 06:13:20 PM UTC, comment #9:
Ok now comes the final patch.
(file #38332)
|
Tue 23 Aug 2016 05:02:48 PM UTC, comment #8:
I would like to ask a question on struct of java object:
what about the static fields of the class?
Are they also included in the struct???
We really need someone with a Matlab license to try.
|
Tue 23 Aug 2016 01:38:11 PM UTC, comment #7:
sorry, correction.
(file #38329)
|
Tue 23 Aug 2016 01:23:22 PM UTC, comment #6:
to implement struct,
one has to find out a list of field names as strings.
To that end, get_invoke_list (JNIEnv jni_env, void jobj_arg)
returning the list of fields and methods is broken into two halfs,
both implemented by get_mf_list
which return either fields or methods depending on a parameter.
I provided in comments the methods get_field_list and get_method_list which are an alternative to get_mf_list.
Dear reviewer,
take whatever you consider better and drop the rest.
(file #38328)
|
Sun 21 Aug 2016 02:45:31 AM UTC, comment #5:
Prior to really implementing this,
I decided to rework DEFUN struct in ov-struct.cc.
I unveilded the various steps for ease of review,
that I did not change functionality at all.
(file #38293, file #38294, file #38295, file #38296)
|
Fri 19 Aug 2016 10:55:55 PM UTC, comment #4:
The attached patch is a reimplementation
of fieldnames, methods and constructors,
or, to be more precise of the according methods in ClassHelper.
Methods getFieldsXXX, getMethodsXXX and getConstructorsXXX:
The return type changed from String to String[],
from ';'-separated list of objects to array of objects.
This is more suitable to implementation of struct of java object.
(file #38287)
|
Fri 19 Aug 2016 10:03:57 AM UTC, comment #3:
what kind of information do you require to confirm or to reject this bugreport?
|
Fri 29 Jul 2016 01:28:48 AM UTC, comment #2:
yes, java fields are turned into struct fields.
If none present, then the resulting struct is empty.
|
Fri 22 Jul 2016 04:14:16 PM UTC, comment #1:
So public data members of the class are turned into fields of the struct? If a class has no public data members does Matlab return an empty struct?
|
Fri 22 Jul 2016 12:19:46 AM UTC, original submission:
shows that method struct can also be applied to java objects.
If done, Octave outputs
error: struct: additional arguments must occur as "field", VALUE pairs
because the object is not recognized as java object.
|