Groovy动态语言 运行在JVM中的动态语言 可以方便的处理业务逻辑变化大的业务
源代码在线查看: outeruser.java
package groovy;
/**
* Sample class used for testing that groovy can call inner classes contructors.
*
* @author Guillaume Laforge
*
* @cvs.revision $Revision: 1924 $
*/
public class OuterUser
{
private String name;
private Integer age;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public static class InnerAddress
{
private String city;
private Integer zipcode;
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public Integer getZipcode() {
return zipcode;
}
public void setZipcode(Integer zipcode) {
this.zipcode = zipcode;
}
public static class Street
{
private String name;
private int number;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
}
}
}