Groovy动态语言 运行在JVM中的动态语言 可以方便的处理业务逻辑变化大的业务

源代码在线查看: spooftask.java

软件大小: 1644 K
上传用户: maple_78
关键词: Groovy JVM 动态语言 运行
下载地址: 免注册下载 普通下载 VIP

相关代码

				package groovy.util;
				
				import org.apache.tools.ant.BuildException;
				import org.apache.tools.ant.Task;
				import org.codehaus.groovy.runtime.InvokerHelper;
				
				public class SpoofTask extends Task {
					private int foo;
				
				    public SpoofTask() {
				        super();
				        SpoofTaskContainer.spoof("SpoofTask ctor");
				    }
				    
				    public void setFoo(final int i) {
				    	foo = i;
				    }
				    
				
				    public void execute() throws BuildException {
				        SpoofTaskContainer.spoof("begin SpoofTask execute");
				        SpoofTaskContainer.spoof("tag name from wrapper: " + getWrapper().getElementTag());
				        // don't rely on Map.toString(), behaviour is not documented
				        SpoofTaskContainer.spoof("attributes map from wrapper: " 
				        		+ InvokerHelper.toMapString(getWrapper().getAttributeMap()));
				        SpoofTaskContainer.spoof("param foo: " + foo);
				        
				        SpoofTaskContainer.spoof("end SpoofTask execute");
				    }
				
				}
							

相关资源