但是请注意,所复制的语法仅包含方法名称和空括号,因此必须记得参数或者必须返回内容帮助或reference面板。
Note, however, that copied syntax contains only the method name followed by empty parentheses, so you must remember the parameters or return to content assist or the reference pane.
第一对空的括号指明将调用不带参数的effectFinished()方法。
The first empty pair of parentheses denotes that I want to call the method named effectFinished() that takes no arguments.
圆括号内是空的,表示了这种方法不包含任何参数。
The parentheses are empty, which indicates that the method takes no arguments.
当您调用一个没有参数的Groovy方法时,您必须使用一对空括号调用它,这使得Groovy可以分清一个属性访问和一个方法调用之间的区别。
When you invoke a Groovy method that has no parameters, you must call it with an empty set of parentheses, which allows Groovy to distinguish between a property access from a method call.
与Groovy不同,Ruby没有针对接收不到参数的方法必须与空括号一起调用的规则,这意味着Ruby无需区分属性和方法。
Unlike Groovy, Ruby doesn't have the rule that methods accepting no parameters must be called with empty parenthesis, meaning that Ruby doesn't need to distinguish between properties and methods.
当调用没有参数的方法,确保在方法名之后加入空括号。
When invoking a method without parameters, be sure to add empty parentheses after the method-name.
当调用没有参数的方法,确保在方法名之后加入空括号。
When invoking a method without parameters, be sure to add empty parentheses after the method-name.
应用推荐