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

源代码在线查看: methoddispatchbug.groovy

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

相关代码

				/**				 * @author Chris Poirier				 * @version $Revision: 1.4 $				 */				class MethodDispatchBug extends GroovyTestCase {				    void doit(Object parameter1, Object parameter2) {				        System.out.println("TestChild::doit( Object, Object )");				    }								    void doit(Boolean parameter1, Object parameter2) {				        System.out.println("TestChild::doit( Boolean, Object )");				    }								    void doit(Object parameter1, Boolean parameter2) {				        System.out.println("TestChild::doit( Object, Boolean )");				    }								    void doit(Boolean parameter1, Boolean parameter2) {				        System.out.println("TestChild::doit( Boolean, Boolean )");				    }								    void testBug() {				    /* @todo				    	strange - this works fine inside eclipse but fails inside Maven				    					        o = this;								        System.out.println("Calling Test.doit( Boolean, Boolean ) -- expect Boolean, Boolean");				        o.doit(true, true);								        System.out.println("");				        System.out.println("Calling Test.doit( Boolean, Integer ) -- expect Boolean, Object");				        o.doit(true, 9);								        System.out.println("");				        System.out.println("Calling Test.doit( Integer, Boolean ) -- expect Object, Boolean");				        o.doit(9, true);								        System.out.println("");				        System.out.println("Calling Test.doit( Integer, Integer ) -- expect Object, Object");				        o.doit(9, 9);				    */				    }				}							

相关资源