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 型。
应用推荐