You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to unmarshal proper types for the elements of Collections ?
Example:
The generated Excel Workbooks interface implements Iterable<Com4jObject> instead of Iterable<_Workbook>. As far as I understand, I have to call .queryInterface(_Workbook.class) on each element manually:
for (final Com4jObject p : excel.getWorkbooks()) {
System.out.println(p.queryInterface(_Workbook.class).getName());
}
Is it possible to get that conversion automagically? I think of something like the following...
I manually change the signatures of class Workbooks and its method iterator to the generic type _Workbook.
The above does not seem to be enough: My JVM dumps when I try that. So I think we need at least ComCollection's fetch method to call queryInterface to cast to the proper class?
The text was updated successfully, but these errors were encountered:
Is it possible to unmarshal proper types for the elements of Collections ?
Example:
The generated Excel
Workbooks
interface implementsIterable<Com4jObject>
instead ofIterable<_Workbook>
. As far as I understand, I have to call.queryInterface(_Workbook.class)
on each element manually:Is it possible to get that conversion automagically? I think of something like the following...
I manually change the signatures of class
Workbooks
and its methoditerator
to the generic type_Workbook
.The above does not seem to be enough: My JVM dumps when I try that. So I think we need at least
ComCollection
'sfetch
method to callqueryInterface
to cast to the proper class?The text was updated successfully, but these errors were encountered: