Why classes generated from xml are deprecated?



I have some classes which are generated from xml. For example :



@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "key", "name"})
@XmlRootElement(name = "caData")
public class CaData {

@XmlElement(required = true)
protected String key;

@XmlElement(required = true)
protected String name;
}


and when I try to use them somewhere



private CaData caData;


or pass them as a parameter



public construct(String name, CaData caData) {
this.caData = caData;
this.name = name;
}


I get the notifier:



The type CaData is deprecated.



Where am I wrong ?


No comments:

Post a Comment