Code completion/hints for Java methods in MATLAB editor?

8 ビュー (過去 30 日間)
Rob Ratcliff
Rob Ratcliff 2013 年 3 月 25 日
Hi,
I'm a Java developer that supports MATLAB developers with Java libraries/GUIs that they can call from MATLAB. Currently, I need to send the MATLAB developer the JavaDoc for them to determine the available methods and associated method signature (arguments and types). This is because it doesn't appear that the MATLAB editor shows hints for Java classes or we don't know how to turn that feature on.
I imagine I could help them write a simple MATLAB function that prints all the method signatures of a given class using Java Reflection, but it'd be much nicer if the MATLAB editor did that in a context sensitive way. Is there a way to configure the MATLAB editor to show the methods and signatures of a given Java class based on the editor context?
I'm sure I'm not the first one to ask this, but I spent some time searching I didn't find anything that popped out at me.
Thanks,
Rob

採用された回答

Friedrich
Friedrich 2013 年 3 月 25 日
Hi,
not that I know off, but you can use the methodsview function for that:
>> a = java.lang.String('hallo')
a =
hallo
>> methodsview(a)
>> methodsview('java.lang.String')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCall Java from MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by