They can view their code in Class Diagrams to see these relationships.
他们可以在类图中查看代码,来观察这些关系。
Code Listing 2 shows the class implementation.
代码列表2显示了这个类执行。
Intents, like activities, are a special class of application code that describe and define what an application wants done.
目的与活动一样,是应用程序代码中的一个特殊类,定义应用程序要做的事情。
Paste this code into your test class and save it.
将此代码粘帖到您的测试类,并保存。
Write the unit test before writing code for class it tests.
首先编写单元测试,然后再编写要测试的类代码。
To keep the code simple, I put the class and the test code in one file.
为了保持代码简单,我把类和测试代码放在一个文件中。
The largest variety of refactorings are those that reorganize code within a class.
最大一类重构是实现了类内部代码重组的重构方法。
In this case, you can modify just the abstract class and the code will compile.
在这种情况下,您仅需修改抽象类,代码将完成编译。
Create an extension to the framework code building class, with which you can customize the generated code.
为框架代码构建类创建扩展,利用此种扩展你可以定制所产生的代码。
Listing 9 shows the complete action class code, not just the segment that changes the project description, so we can learn about some utility methods created for the second revision of the plugin.
清单9显示了完整的操作类代码,不只是改变项目描述的片断,这样我们可以学习为第二版插件创建的一些实用方法。
To implement this listener class, we'll code an anonymous class in the main Explorer Window.
为了实现该侦听器类,我们将在主资源管理器窗口中编码一个匿名类。
Then modify the class as code Listing 1 shows.
然后编辑类,代码如列表1 所示。
Listing 1 shows the code for this fourth class.
清单1将显示第四个类的代码。
For further details, refer to that class in the sample code included with this article.
有关更多细节,参考本文附带的样例代码中的类。
Figure 1 shows the class model for the code being generated.
图1显示了正在生成的代码的类模型。
This has the added benefit of separating singleton code from the class code leaving the flexibility to use several instances of the class or using the class as a singleton.
这样分离出单例结构的代码,将有利于保持按单例模式使用类或不按单例模式使用类的灵活性。
A class can't be loaded until the executing code makes a reference to that class.
只有在执行代码引用类的时候才加载该类。
Listing 5 shows the callback class used by the example code.
清单5给出示例代码使用的回调类。
Fowler also identifies the Large Class as a code smell.
Fowler还将庞大的类也看作一种代码气味。
Because a class instance's code is not pickled, you can add, change, and remove methods without impacting existing pickled instances.
由于不能pickle类实例代码,因此可以添加、更改和除去方法,而不会影响现有的经过pickle的实例。
The following code shows AppContext class.
以下代码展示了appcontext类。
This class is mostly boilerplate code, not directly relevant to Comet.
这个类基本上是样板代码,与 Comet没有直接的关系。
The controller class contains the code the Web service makes available to a client.
该控制器类包含可用于客户机的Web服务代码。
Modify your provider class to resemble the code in Listing 4.
编辑您的provider类,代码与列表4所示的代码类似。
To create a database row, you create an instance of the corresponding class with the code.
要创建数据库行,需创建对应类的实例,代码如下。
A script can now use this widget class by including code similar to the following.
脚本可按照如下代码使用小窗口类。
A snippet of the Action class code shown in Listing 1 illustrates how the Model service is called from the Action class.
清单1中所示的一小段action类代码说明了如何从action类中调用模型服务。
The net effect of the DescriptionBuilderVisitor class code is to construct an array of field definitions matching the fields of the class supplied to the SimpleClassDescription constructor.
DescriptionBuilderVisitor类代码的实际效果是构建一组字段定义,与提供给SimpleClassDescription构造函数的类的字段匹配。
On the last line, using an object rather than a class simplifies the code.
在最后一行,我们使用了一个object而不是一个class来简化代码。
The inner class code calls these static methods whenever it needs to access the mValue field or invoke the doStuff method in the outer class.
内部类会在外部类中任何需要访问mValue字段或调用doStuff方法的地方调用这些静态方法。
应用推荐