给定一个对象(比如下面定义的Foo),静态横切使得创建新方法、添加附加的构造函数,甚至改变继承层次都变得十分简单。
Given an object (such as Foo, defined below), static crosscutting makes it quite simple to create new methods, add additional constructors, and even alter the inheritance hierarchy.
如果你需要的动作方法在其它的区域中,你可以在对象中传递区域名称,如下。
If the action method you need is located in another area, you can pass the area name in an object as shown.
如下的代码显示了获得图书价格所需的对象和方法。
The code below illustrates the objects and methods necessary to get back a book's price.
这一方法和适当的getter和setter方法一同设置 formBean的属性,如下所示,其中使用从模型返回的对象实例
This method sets the attributes of the formBean with the appropriate getter and setter methods, as shown below using the object instance returned from the model
可搜索对象的search方法执行该搜索并返回一个SIAPI结果集对象,如下所示。
The search method on the searchable object executes the search and returns a SIAPI result set object as shown below.
在MacromediaFlash中加载ui时,调用XML对象的加载方法,初始化用户所选视图中的XML内容的加载,如下所示。
When the UI loads in Macromedia Flash, you call the load method of the XML object that initiates loading of the XML content from the view selected by the user as follows.
正如下所述,在静态同步方法中用的就是类对象的锁。
As described below, the locks associated with Class objects are used in static synchronized methods.
课题以水源热泵供热水系统为受控对象,研究了其节能优化控制方法,主要进行的研究工作如下。
Study on energy saving and optimization control of a hot water supply system is done, which is equipped with ground-water heat pump system in a high building.
通过CGLView的对象调用方法代替了以基类形式直接调用基类的方法操作模式-如下。
Now the methods are called using the object of the CGLView class instead of calling it directly as base class methods.
通过CGLView的对象调用方法代替了以基类形式直接调用基类的方法操作模式-如下。
Now the methods are called using the object of the CGLView class instead of calling it directly as base class methods.
应用推荐