Q:

spring: a bean that receives a list of Classes

I want to define in my Spring XML context a bean that has a property of the type List of classes: i.e. List<Class<?>> classes
How do I send that bean a number of classes, say java.lang.String and java.lang.Integer?
The list needs not be reusable, i.e. I will not refer to it in another bean.

A:

With Spring, the simplest possibility usually works.....
   <property name="classes">
      <list>
         <value>java.lang.String</value>
         <value>java.lang.Integer</value>
      </list>
   </property>

