I've got a set of JAXB generated classes and some of the classes have setter methods which accepts
"Object" as the parameter. For example:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name="Car", propOrder = {
"defaultCar"
}
public class Car {
@XmlElement(name = "DefaultCar")
protected Object defaultcar;
public void setDefaultCar(Object value) {
this.defaultCar = value;
}
After I've created instances of these classes in my code, I call the setter methods passing in the required value. Although the method's parameter is Object, the values are most likely to be strings (I've got no control over how it is defined). However, to keep things consistent, I cast the string to Object so that it matches the me