How do I instantiate a java interface from matlab?
3 ビュー (過去 30 日間)
古いコメントを表示
I am trying to instantiate an interface of a java class. In java I would:
Class.IInterface newinterface = new
(I think)... But how can I do this within the matlab syntax?
1 件のコメント
Richard Alcock
2011 年 5 月 3 日
Is you example missing something - it ends rather suddenly, and isn't currently valid Java.
回答 (2 件)
Andy Zelenak
2019 年 10 月 11 日
編集済み: Andy Zelenak
2019 年 10 月 11 日
I can confirm that it is possible to do this. I've used javaMethod(...) to call public static methods of a Java class which implements an interface. It didn't seem to take any unusual setup effort.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Call Java from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!