bugGNU Octave - Bugs: bug #48849, which: return Java class methods

 
 

bug #48849: which: return Java class methods

Submitter:  Ernst Reissner <ernstreissner>
Submitted:  Mon 22 Aug 2016 09:47:10 AM UTC
   
 
Category:  Octave Function Severity:  1 - Wish
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Need Info Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 23 Aug 2016 02:41:49 PM UTC, comment #2: 

Hm,... maybe.
I think, which could be useful also for java methods.
I do not say I can't do without it.

Ernst Reissner <ernstreissner>
Tue 23 Aug 2016 02:31:19 PM UTC, comment #1: 

According to https://www.mathworks.com/help/matlab/ref/which.html, only methods that are in classes that are "loaded" are returned.

This also implies the following syntax that Matlab supports, but Octave does not:


x = javaObject ("java.lang.String");
toString (x)


where the method is called as a function with the object as argument. I'm not saying this can't be done without that support, but that's what "which" seems to be paired with, the list of functions that you can call as a bare function.

Mike Miller <mtmiller>
Group Member
Mon 22 Aug 2016 09:47:10 AM UTC, original submission:  

according to 'Undocumented Secrets of MATLAB-Java Programming'
function which is also applicable to java methods.

which setSize
yields
setSize is a Java method  % javax.swing.JPanel method

which setSize -all
yields a list accordingly.

Ernst Reissner <ernstreissner>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by ernstreissner (Submitted the item)
  • -email is unavailable- added by ernstreissner
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-23 mtmiller CategoryNone Octave Function
        Severity3 - Normal 1 - Wish
        Priority5 - Normal 3 - Low
        Item GroupNone Matlab Compatibility
        StatusNone Need Info
        Summaryjava integration which on java methods which: return Java class methods
    2016-08-22 ernstreissner Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-54b4.
    Corresponding source code