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!