代码对象示例以及概述。
使您的代码对象和面向服务。
现在你应该可以在文件夹中添加代码对象了。
Now you should be able to go to a folder and add a source code object.
获取一个值,该值指示指定的字符串是否引用同一个代码对象。
Gets a value that indicates whether the specified strings refer to the same code object.
下一节将介绍如何在代码中查找这些对象。
The next section covers how to look up these objects in code.
下面的示例代码假设此对象存在。
在您养成这个习惯时,它可以帮您—和维护代码或使用对象的人员—节省很多时间。
When you build this habit, it can save you - and people maintaining your code or using your objects - a lot of time.
您可以通过将实际的模型知识封装到模型中来保证代码是面向对象的。
You can keep the code object oriented by encapsulating the actual model knowledge within the model itself.
然后再编写代码来绘制这些对象。
接下来,将了解如何在代码中查找这些对象。
该代码向对象添加了一个连接的名字和值。
清单3给出模拟设备对象的代码。
如果模板期望获得对象,则代码不应当提供列表。
If a template expects an object, code shouldn't provide a list.
输入以下代码,将对象更改保存到数据库。
Enter the following code to save object changes to the database.
以下代码示例使用业务对象类。
图1显示了每行代码执行后各对象的状态。
Figure 1 shows the state of the objects after each line of code executes.
客户端的点击操作源对象代码得到了更新,如列表3所示。
The Client-Side Click-to-Action source object code is updated, as shown in Listing 3.
只有创建缓存对象的代码需要了解新的缓存类型。
Only the code creating the cache object needs to know about the new kind of cache.
创建此对象的代码如清单14所示。
下面的示例代码填充输入数据对象。
Here is some sample code that populates the input data object.
通过一个编译过程,该高级代码被编译成一个名为对象代码 的中间表示。
Through a compilation process, this high-level code is compiled into an intermediate representation called object code.
此外,如果代码使用对象,则有指向对象的导致负担过重的映射平面行。
Further, if your code USES objects, there's a tax-incurred mapping flat rows to objects.
在这个解决方案中,执行查找的代码被返回模仿对象的代码自动替换。
In this solution, the code that performs the lookup is replaced automatically with code that returns a mock object instead.
如果放置了过少的互斥对象,代码将出现奇怪和令人尴尬的错误。
If you place too few, your code will have weird and embarrassing bugs.
查看该代码的面向对象版本,可以看到代码变得更加抽象。
In looking at the object-oriented version of the code, you can see that the code becomes more abstract.
清单7显示了修复后的ApplicationUtil对象代码。
Listing 7 shows the fixed code of the ApplicationUtil object.
Ksplice更容易处理这种“模块化”对象代码。
Such "modular" object code is more easily manipulated by Ksplice.
列表3:创建GridFileSystem对象的代码。
清单2显示了ApplicationUtil对象的代码。
清单2显示了ApplicationUtil对象的代码。
应用推荐