使用 Quick 在 Java 对象和 XML 之间进行转换
2010-03-25 00:00:00 来源:WEB开发网
清单 5. Address 类
public class Address {
/** The type of address */
private String type;
/** The street address */
private String street;
/** The city */
private String city;
/** The state */
private String state;
/** The zip code */
private String zipCode;
public Address() { }
public Address(String type, String street, String city,
String state, String zipCode) {
this.type = type;
this.street = street;
this.city = city;
this.state = state;
this.zipCode = zipCode;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getZipCode() {
return zipCode;
}
public void setZipCode(String zipCode) {
this.zipCode = zipCode;
}
}
更多精彩
赞助商链接