Sometimes beans have getproperty and setproperty methods instead.
而有时Beans有getproperty和 setproperty 方法。
The example in code Listing 1 uses the getProperty method to determine whether a label contains a success message.
代码列表1中的例子使用了getProperty 程序来确定一个标签是否包含一个成功消息。
The result of judicious design, all dynamic method calls get routed through invokeMethod and property access through getProperty and setProperty.
明智设计的结果是:通过invokeMethod调用所有的动态方法,通过getProperty和setProperty访问属性。
The getProperty method returns an instance of the class Object, so you must cast the result into the appropriate type, which, in this case, is a string.
getProperty方法返回Object类的一个实例,因此您必须把结果转换成合适的类型,在本例中是 string 型。
Finally, I use GetProperty to get information about a specified property of the control and then get the value of the control property using the GetValue method.
最后使用GetProperty获取控件的指定属性的信息,并使用GetValue方法获取控件属性值。
The two getProperty() methods, shown in Listing 20, delegate to the TypeGetter to retrieve the configuration field, handling default values if no value was specified in the configuration.
清单20中显示的两个getProperty()方法委托TypeGetter来获取配置字段,如果配置中没有指定值,则处理默认值。
A MOP implementation is possible in Groovy because every object in Groovyland implicitly implements groovy.lang.GroovyObject, which defines two methods dubbed invokeMethod() and getProperty().
在 Groovy中可以实现MOP是因为,在Groovyland 中每一个对象都隐式地实现 groovy.lang.GroovyObject,它定义了invokeMethod() 和 getProperty()两个方法。
A MOP implementation is possible in Groovy because every object in Groovyland implicitly implements groovy.lang.GroovyObject, which defines two methods dubbed invokeMethod() and getProperty().
在 Groovy中可以实现MOP是因为,在Groovyland 中每一个对象都隐式地实现 groovy.lang.GroovyObject,它定义了invokeMethod() 和 getProperty()两个方法。
应用推荐