On Mon, May 23, 2016 at 12:18 PM, David Jencks <david_jen...@yahoo.com.invalid> wrote: > Looking into this more, the reason I didn’t support List<Foo> etc originally > is that its much more complicated to deal with figuring out the type > information than with an array. > > I’m not going to add this support directly, but will look into starting to > use the object converter service when it seems more or less ready. I have to > investigate whether the nested object key encoding scheme implemented in DS > can be added to a spec converter using an adapter. > > Meanwhile, can you use an array?
Yes I can, I was just simply trying to experiment with the use of interfaces and something that would warrant the use of an interface (a non primitive type that can't be used on an annotation), I had an array originally in the annotation, so I simply switched to a List to force the usage of an interface. Collections and similar generic types would be likely more complicated to handle with the type erasure aspect that is associated with their use. I'll probably just stick with using annotations going forward though, using implementation specific enhancements can cause some significant headache later (especially since I don't know how other OSGi R6/DS 1.3 implementations may or may not support the same extended functionality). This has been a good learning experience though as this is my first time in using the DS 1.3 annotations, as a migration from previously using the Felix SCR annotations, so I do very much appreciate your effort and feedback. Thanks, Steven > > thanks > david jencks > >> On May 22, 2016, at 9:59 AM, David Jencks <david_jen...@yahoo.com.INVALID> >> wrote: >> >> This extension has been used, I think, mostly by me, so the limitations are >> the things I’ve not happened to run up against. At the moment the only >> kinds of interfaces that DS supports are ones that look like annotations >> except for inheritance. So you can only have primitive, String, Class, >> interface, and arrays of the previous as return types. We’re treating the >> List<Long> return type as an interface valued return type rather than >> something like long[] as you expect. DS doesn’t have access to the metatype >> information. >> >> I’ll see if I can find time to support List, Set, Collection return types >> for 2.0.4. I need to consult the draft object conversion spec to see what >> might be reasonable. >> >> thanks >> david jencks >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > For additional commands, e-mail: users-h...@felix.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org