用例集合的公共类集合仅仅简单地定义为。
The set of common classes for the set of use cases is simply defined as.
你不应该只用一个公共类来创建一个程序程序集。
You should not create assemblies with only one public class.
非公共类中的一些方法,它们永远也不会被实际调用,只是为了满足某个接口契约而必须实现。
Methods inside nonpublic classes that are never actually invoked but must be implemented in order to satisfy the contract of an interface.
任何编程语言符合CLI标准可以访问公共类库,可以编译成一个共同的中间语言(字节码)。
Any programming language that conforms to CLI criteria can access a common class library and can be compiled into a common intermediate language (bytecode).
我这里有一个推荐:通过观察所有的公共类开始,用一个公共基类合并这些类到一个程序集中。
Here's my recommendation: Start by looking at all your public classes. Combine public classes with common base classes into assemblies.
为了提供一致的开发人员体验,公共公开的元素(如公共类和受保护的方法)必须遵守这些准则。
To provide a consistent developer experience, these guidelines are required for publicly exposed elements such as public classes and protected methods.
我喜欢编写新的代码,但也喜欢采用一些现有的代码,以某种方法将其简化或将重复的代码提取到一个公共类中。
I'd rather write new code, but I enjoy taking some existing code and reducing complexity in a method or extracting duplicate code into a common class.
如果想要让某个公共类的方法仅限于由同一个类的成员访问,该采用哪一个访问修饰字实现这一目的呢?
You want to limit access to a method of a public class to member of the same class. Which access modifier accomlishes this objective?
addOrderFrom()方法成为公共类的匿名内部类创建的定义,将这两个工作项目包装起来。
The addOrderFrom() method collapses to the definition of an anonymous inner class creation of the command class, wrapping the two work items.
然而,这个命名糟糕的公共类在代码中保留的时间越久,则相关的使用也会越来越多,改变起来就越来越困难。
However, the longer the badly named class remains in the code base the more prevalent its usage becomes, and the bigger the task of changing it.
修改catalina .properties文件,以使整个cloudscape库都包含在公共类路径中。
The catalina.properties file is modified so that the entire Cloudscape library is included in common classpath.
更好的解决方案是将包结构分解成两个源目录,一个负责客户端代码,一个负责服务器端代码,然后将公共类复制到两个目录中。
A more elegant solution might be to split package structure across two source directories for client-side and server-side code and to duplicate common classes into both directories.
修改 catalina.properties文件,以使整个Cloudscape库都包含在公共类路径中。
The catalina.properties files is modified so that the entire Cloudscape library is included in common classpath.
你已经学习服务定位器模式如何可以用于封装,你的富互联网应用程序可以作出的,在一个可预计位置的一个公共类下的,所有不同的服务调用。
You've learned how the service Locator pattern can be used to encapsulate all the different service calls that your rich Internet application might make under a common class in a predictable location.
我承认我没有系统地使用自动化测试,这是因为我的经验表明,对于那些其公共接口不经常更改的类,自动化测试是最有效的。
I confess that I do not use automated tests systematically because my experience has been that they are most effective with classes whose public interface does not change often.
在控制器类中实现作为公共实例方法的API方法。
Implement the API methods in the controller class as public instance methods.
在服务类中实现作为公共实例方法的API方法。
Implement the API methods in the service class as public instance methods.
API方法实现是作为公共实例方法定义在控制器类中的。
The API method implementations are defined in the controller class as public instance methods.
一般而言,类的每个公共方法都应有一个单元测试。
In general, there should be a unit test for every public method of your class.
整个应用程序架构中用于启动、提交和回滚事务的惟一方法就是api层的域类中包含的公共方法。
The only methods in the entire application architecture that start, commit, and roll back a transaction are public methods contained in API layer's domain classes.
源代码还提供了其他公共和私有方法以及类。
The source code also includes other public and private methods and classes.
这些类执行一个公共接口,如图1所示。
These classes implement a common interface, as shown in Figure 1.
如果包访问不利于对象间的通信,就需要向类中添加更多的公共方法。
If package access prevents objects from communicating, add more public methods to the classes.
我们实现这个类来提供一些公共方法并隐藏SNMP接口的细节。
We implemented this class to provide some common methods and to hide the details of the SNMP interface.
我想把性能的公共元素提取到一个抽象基类。
I'll want to extract the common elements of performance into an abstract base class.
图22:分析用例之中具体的和公共的实现类。
Figure 22: Analyzing specific and common implementation classes among use cases.
从任意位置到类公共组件的接入。
做到这一点的最佳方法是在一个小的公共基类的集合中封装特定于Domino的实现细节。
The best way to do this is to encapsulate the Domino specific implementation details in a small set of common base classes.
main函数,它调用space类中使用int参数的公共函数func。
A main function calls the public function func with int arguments of class space.
例如,假设您希望利用反射显示给定类的所有公共方法。
For example, say that you want to display all of the public methods of a given class using reflection. Listing 7 shows an example.
应用推荐