步骤4 .对于其他的类,重复步骤2,并将新生成的ddl命令附加到之前保存的DDL命令后面。
Step 4. Repeat Step 2 for all other classes and append the newly generated DDL commands to the previously saved ones.
重复第4步创建第二个类。
为所有类声明这些构造函数可能是乏味的,但是我们在《第4章- Traits》中探索的技巧可以帮助我们减少这样的重复。
Declaring all these constructors in each class could get tedious after a while, but we explored techniques in Chapter 4, Traits that can eliminate repetition.
BPMN有两类重复活动,称作循环(DoWhile)和多实例(ForEach)。
BPMN has two types of repeating activities, called looping (DoWhile) and multi-instance (ForEach).
这些重复使应用易于出错(例如,一个拼写错误的类名可能在运行时显示为一个难于调试错误)。
Those repetitions make the application prone to minor errors (e.g., a mis-spelled class name would show up as an hard-to-debug error at runtime).
提取通用行为并把它们包含在泛型DAO 中,让类的所有用户通过泛型 DAO访问这些功能,这样就可以减少代码重复。
You can reduce code duplication by abstracting the common behavior and including it in the generic DAO, where all users of the class will have access to the functionality.
我喜欢编写新的代码,但也喜欢采用一些现有的代码,以某种方法将其简化或将重复的代码提取到一个公共类中。
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.
由于ID对于特定类是相同的,因此您只需要查找一次,然后便可重复使用。
Because the IDs are the same for a given class, you should look them up once and then reuse them.
生命周期这一类特别重要;它被用于在应用程序或组件转移到下一个活动或重复当前活动之前检查活动的完成情况。
The life cycle category is particularly important; it is used to check the completion status of an activity before the application or component moves to the next activity or repeats itself.
这个构建工程的过程不是非常精确的,一些类文件在多个JAR文件里面重复了,一些包的内容在多个JAR文件里面被扩展了。
The build process here is not very particular; some class files are repeated in multiple JAR files, and the contents of some packages are spread across multiple JARs.
类的职责描述了这个类在系统中所提供的服务,而且其它类不会重复提供这些服务。
A responsibility of a class describes the services that this class will provide in our system, and that no other class will provide.
一旦您创建了一个带有部件与接口的类,那么接下来您就可以在多种背景下重复使用它了。
Once you’ve created a class with ports and interfaces, it follows that you can re-use them in multiple contexts.
查找重复代码的度量方法是在代码库中的类的内部和其他类之间搜索代码重复。
The measure for finding duplicated code is to search for code duplication within classes and among other classes in the code base.
就软件开发项目而言的浪费一般属于三类:(1)等待时间,(2)重复工作,和(3)缺陷生成。
Waste in terms of a software development project generally falls into three categories: (1) wait time, (2) rework, and (3) defect generation.
这种称呼的重复总是出现在这一类陈述之后。
在UML术语中,原型只不过是一个“定型”的类,它可以进一步将实际实体抽象为真正可重复利用并可轻松扩展的分析/设计和实施构件。
In UML terms, an archetype is nothing but a "stereo-typed" class that further abstract real world entities into truly reusable and easily extensible analysis/design and implementation artifacts.
重复的类结构总有些碍手碍脚,所以如果频繁使用BCEL,那么可能需要编写一个包装器类,它可以隐藏其中一些不同之处。
The duplicate class structures tend to get in the way, so if you're doing much with BCEL, it may be worthwhile to write wrapper classes that can hide some of these differences.
利用这些比较,绑定编译器可以确定在类中发现的已经存在的方法是否仍然需要,并避免创建重复的类或方法。
The binding compiler USES these comparisons both to make sure that pre-existing binding methods it finds in classes are still needed, and to avoid creating duplicate classes or methods.
例如,设计师可以创建一个可重复利用的缓存,当性能需要一个如简单缓存一类的东西时就可以在应用程序中使用。
For example, the architect could create a reusable in-memory cache, to be used in the application when performance needs dictate the need for something like a simple cache.
对于该类名与其他小部件的类名重复的情况,就更应如此了。
This is good in case this class name is used for other widgets as well.
当您不知道页面上有几个类时,或这些类开始重复时,会发生什么呢?
What happens when you aren't sure how many classes are on the page, or they start to overlap themselves?
没有工具的话,类间的重复就更难评估。
Duplication among classes is more difficult to assess without the help of a tool.
这里我们使用应用程序名作为类加载器的名称,以避免重复。
Each EAR application should have a unique string name for the class loader. Here, we use the application name in the class loader name to avoid repetition.
此外,这两个文件系统都支持数据重复删除、内部数据保护(类raid保护)、数据和元数据校验和以及其他存储功能(如快照)。
In addition, both file systems support data de-duplication, internal data protection (RAID-like protection), data and metadata checksums, and other storage features (like snapshots).
正如我在命令式版本中所做的一样,我将重复的代码提取到其factors类中,并且为便于阅读,将factors方法的名称改为of,如清单8所示。
Just as I did with the imperative versions, I extract the duplicated code into its own factors class, changing the name of the factors method to of for readability, as shown in Listing 8.
在清单6中,我用了清单4中的重复代码,使用了PullUpMethod重构来降低重复度—将行为从较大方法提取到一个抽象类方法中。
In Listing 6, I take the duplicated code in Listing 4 and reduce the duplication by using the Pull up method refactoring - extracting behavior from a larger method into an abstract class method.
如果用一个现有的CodeSource装载类,那么就会重复使用它已经建立的ProtectionDomain。
If you load a class from an existing CodeSource then its already established ProtectionDomain will be reused.
对剩下的两类 portlet 可以重复以上的安装步骤。
Repeat these installation steps for the remaining two portlets.
在person类中有一些重复的代码,但我把它留给稍后的重构练习。
There's a bit of code duplication in the Person class, but I'll leave that for a later refactoring exercise.
比如,很多类或方法常量首先作为JUnit断言写入,如果不自动触发异常这些常量,则可以在产品诊断中重复使用它们。
For example, many class or method invariants are first written as JUnit assertions; these invariant checks could be reused for production diagnostics if it did not automatically trigger exceptions.
应用推荐