Let say I have such class:
public class MyClass {
...
private Map<String, Class> eventsMapping = new HashMap<String, Class>();
...
}
public void setEventsMapping(Map<String, Class> mappings){
this.eventsMapping = mappings;
}
How to create bean of such class with filled in eventsMapping? I mean XML definition of bean. The problem is that HashMap contains Classes and not objects.
I assume that it should be something like:
<bean id="myBean" class="com.my.MyClass" >
<property name="eventsMapping">
<map>
<entry key="ABC">
<bean class="java.lang.Class">
???
</bean>
</entry>
</map>
</property>
</bean>
How to pass there particular Class (not an object)