I’m playing around with some code katas and trying to get a better understanding of java generics at the same time. I’ve got this little method that prints arrays like I like to see them and I have a couple of helper methods which accept an array of ‘things’ and an index and returns the […]
Category: generics
Defining spring bean using a class with generic parameters
If I have a class that looks something like this: public class MyClass<T extends Enum<T>> { public void setFoo(T[] foos) { …. } } How would I go about declaring this as a bean in my context xml so that I can set the Foo array assuming I know what T is going to be […]