Details
Description
Currently the Unmarshaller class has a constructor that takes a class type Unmarshaller(java.lang.Class c). There is no other way to set the class type on the Unmarshaller, except through the constructor. However, I am using the Spring factory bean to instantiate and get a new instance of the Unmarshaller. And as such, I cannot set the class type on the Unmarshaller once it has been created. We need to have a setClass(Class) or setRootClass(Class) on the Unmarshaller, so that the class type can be programmatically set after I have obtained an instance of the Unmarshaller through Spring.
The following is the e-mail thread that prompted the opening of this issue:
http://www.nabble.com/Problem-when-classes-are-re-ordered-in-the-Castor-xml-mapping-file-tf3269074.html#a9096120
Final patch for review.