如何在java的groovy闭包上设置所有属性

时间:2017-04-11 02:10:30

标签: groovy

我正在看这个,我们的代码调用了closure.setProperty。我没有看到getProperties方法来读取属性

http://grepcode.com/file/repo1.maven.org/maven2/org.codehaus.groovy/groovy-all/2.4.4/groovy/lang/Closure.java#Closure

生成的groovy的snippit是

_attrs82 = [defaultArgument:'entity.firstName', label:'First Name']; //htmlLine 23:23  groovyLine=64

_body82 = { //htmlLine 23:23  groovyLine=67
  __out.print("<input type=\"text\" name=\""); //htmlLine 23:23  groovyLine=69
   __out.print(field.name); //htmlLine 23:23  groovyLine=72
  __out.print("\" value=\""); //htmlLine 23:23  groovyLine=75
   __out.print(field.flashOrValue); //htmlLine 23:23  groovyLine=78
  __out.print("\" class=\"input-xlarge\">"); //htmlLine 23:23  groovyLine=81
}; //htmlLine 23:23  groovyLine=82

runTag('field', _attrs82, _body82, 'at WEBPIECESxPACKAGE.base.crud.userAddEdit.html(userAddEdit.html:23)'); //htmlLine 23:23  groovyLine=84

感谢, 迪安

0 个答案:

没有答案