大名鼎鼎的java动态脚本语言。已经通过了sun的认证

源代码在线查看: callinnerclassctortest.groovy

软件大小: 1630 K
上传用户: hjf
关键词: java sun 动态 脚本
下载地址: 免注册下载 普通下载 VIP

相关代码

				import groovy.OuterUser								/**				 * Checks that it's possible to call inner classes constructor from groovy				 * @author Guillaume Laforge				 */				class CallInnerClassCtorTest extends GroovyTestCase {								    void testCallCtor() {				        def user = new groovy.OuterUser()				        user.name = "Guillaume"				        user.age = 27								        assert user.name == "Guillaume"				        assert user.age == 27				    }								    void testCallInnerCtor() {				        def address = new groovy.OuterUser.InnerAddress()				        address.city = "Meudon"				        address.zipcode = 92360								        assert address.city == "Meudon"				        assert address.zipcode == 92360				    }								    void testCallInnerInnerCtor() {				        def address = new groovy.OuterUser.InnerAddress.Street()				        address.name = "rue de la paix"				        address.number = 17								        assert address.name == "rue de la paix"				        assert address.number == 17				    }								}			

相关资源