"static def at" 和 "static at" 有什么区别
What is difference between "static def at" and "static at"
我正在浏览文档
http://www.gebish.org/manual/0.9.2/api/geb/Page.html
发现 at
closer 定义为 "static def at"
但在 Page.groovy
中相同的是
static at = null
而不是static def at =null
有区别。
您正在查看文档,您会在其中看到 classes/interfaces/traits 是如何定义的。它的呈现方式与您编写 类 等
的方式完全相同
当您在 Geb 中使用它时,您可以跳过 static def at = null
中的 def
,因为您正在使用已经定义的 function/closure。
另外:使用 http://www.gebish.org/manual/current/api/geb/ 而不是 0.9.2。 Geb 已经在 0.12.2 中了! ;)
None 完全没有。两者都可以理解为
static Object at;
我正在浏览文档
http://www.gebish.org/manual/0.9.2/api/geb/Page.html
发现 at
closer 定义为 "static def at"
但在 Page.groovy
中相同的是
static at = null
而不是static def at =null
有区别。
您正在查看文档,您会在其中看到 classes/interfaces/traits 是如何定义的。它的呈现方式与您编写 类 等
的方式完全相同当您在 Geb 中使用它时,您可以跳过 static def at = null
中的 def
,因为您正在使用已经定义的 function/closure。
另外:使用 http://www.gebish.org/manual/current/api/geb/ 而不是 0.9.2。 Geb 已经在 0.12.2 中了! ;)
None 完全没有。两者都可以理解为
static Object at;