On 10/07/2009 12:11 PM, Emmanuel Bernard wrote:
Class<?> is the closest equivalent to Class. It adds no burden
at all
(people can still use the raw type if they wish to stay in the pre-5
era). And literally Class<?> means what you've described: "we can't
say anything about the Class type returned"
I think it's a burden cos you're forcing client to either accept
Class<?> or cast to Class. Example:
A method defined as:
public static List<Class<?>> infinispanClasses();
Any client needs to do:
List<Class<?>> ispnClasses = ClassFinder.infinispanClasses(cp);
A client can't do:
List<Class> ispnClasses = ClassFinder.infinispanClasses(cp);
I see that as a burden on the client cos you're forcing the client to
deal with generics that say nothing.
On 7 oct. 09, at 12:02, Galder Zamarreno wrote:
> Hi,
>
> I'm a bit concerned about the usage of Class<?> in
> org.infinispan.util.ClassFinder because in pretty much all those
> methods, we can't say anything about the Class type returned and by
> keeping Class<?>, you're forcing clients to deal with generics that
> don't add anything.
>
> Thoughts?
> --
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/infinispan-dev
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache