Looking for insight into undocumented use of MATLAB's methods() function -


I have looked completely, but does not see [ab] = methods (classname) documents . I mean, single variable output is documented, but not two-variable output. I can not find any documents in MATLAB or in the documented matlab, or here too maybe I missed it?

If I call it with a matlab class, for example char

  [a b] = methods (char);   

Then there is a list of methods for all a , and b is []

But ...

For Java classes, b takes a few useful values. Assume that javaClass is the name of a Java class or Java class.

Usually, I'll call either a = method (javaClass) or = method (Java class, '- full') . However, I noticed that I also

[ab] = method (javaClass)

when I do:

  • a is a cell containing a unique list of all class method names (as expected)
  • b with an array of columns with each column X6 cell is:
    1. Fully qualified returning class
    2. method name
    3. Fully qualified method name
    4. Input parameters (in brackets), or just ()
    5. 'throws fully.qualified.exception.name , or []

      example:

        [ab] = method (java.lang.Integer);   

      Then, one a & lt; 32x1 cell & gt; Includes simple names like 'Integer', , 'bitcount', , etc., but b is a & lt; 43x6 cell & gt; In which each variation of each function is included, for example, one of the values ​​is

        COL VALUE 1. static 2. java.lang.Integer 3. valueOf 4. java.lang.Integer ValueOf 5. (java.lang will show .string) 6. java.lang.NumberFormatException` throws   

      Therefore, my question is:

      The main question: Is this Is completely insecure? Because it is undocumented, I'll assume that; However this provides me some inherent functionality which is good for not being duplicate. Work is not mandatory for parsing, but this functionality is already here.

      Where does it come from? This is, is it actually the MATLAB function, or does it have some Java functions that it is using?

      Does anyone use it? Or (according to the main question) should it be avoided?

      Is there a documentation on this? Beyond this posture, I mean, I mean, sure, this is a straightforward forward function .... and is it interesting enough for anyone to make any difference?

      I am at MATLAB 2011b, does this functionality still exist in the later version of MATLAB (2013A)?

      For MATLAB's classes ( classdef style), you have the same information You can use to get:

        mc =? Timer mc.MethodList   

      The experiment shown above has been estimated, especially for Java classes and objects, observe the source code of the function which internally Methods using two outputs .

        Edit methods   

      methods View

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -