列表3是一个显示如何执行规则类的代码片段。
Listing 3 is a code snippet that shows how you can implement a rule class.
类域中包含您先前所创建的规则类的名称。
The class field contains the qualified name of the rule class that you created earlier. The category field contains the identifier string for your Examples category.
本例中的规则类,如同在同一行中定义多个变量,例如
The rule class in this example will look for C++ code that declares multiple variables on the same line. For example
所有的规则类必须扩展转换框架定义的abstractrule类。
Any rule class must extend the AbstractRule class defined by the transformation framework.
在您详细察看转换之前,我们先要修正规则类,使其能够调用刚刚产生的类。
Before you look in detail at the transform, amend the rule class to invoke this generated class.
您可能会想,添加一条新规则,要比创建规则类和向插件添加一个扩展容易。
As you might expect, adding a new rule is a simple matter of creating a rule class and adding an extension to the plug-in.
每个规则类都实现了Rule Implementor接口,该接口包含两个方法:fire和init。
Each rule class implements the RuleImplementor interface which includes two methods: fire and init.
在规则类被完成之后,它需要通过在分析架构中的所提供的扩展点被描述出来,从而使得代码评审引擎能够将其发现。
After the rule class is completed, it needs to be described through the provided extension points in the analysis framework so that the code review engine can discover it.
考虑一下如何将此规则应用于方法和类。
在下一个章节,我们会讨论类和对象内部的可见性规则。
In the next section, we'll discuss visibility rules within classes and objects.
例如,你可以附加相应的用户体验情节串连图板,参与实体的类图,相关业务规则等等,作为你的用例规格的附加描述。
For example, you can attach corresponding user-experience storyboards, class diagrams of participating entities, related business rules, and so on, as appendices to your use-case specifications.
我们或做出适用于所有情形的过滤器修改,或为特定包或类添加定制规则。
We either make a blanket filter change, or add in a custom rule for the specific package or class under investigation.
如果需求、规章、策略或规则覆盖模型中的很多类、流程中的很多任务,分离出来的规则就要被明确地表示出来。
If a requirement, regulation, policy or rule spans many classes in the model and many tasks within the process, externalized rules are strongly indicated.
可以看到,样式表规则使用ID、类和元素选择器匹配清单1的各部分内容。
You can see the rules using ID, class, and element selectors matching parts of Listing 1.
调用该方法执行先前加载到类构造函数中的规则。
Invoking this method executes the rules that were previously loaded in the class's constructor.
例子是用例、用例模型、业务规则、类、类图、序列图、数据模型和补充规约。
Examples are use cases, use case models, business rules, classes, class diagrams, sequence diagrams, the data model, and supplementary specifications.
JVM规范中详细描述了装入类的规则。
The rules for loading classes are spelled out in detail in the JVM specification.
正如您所猜到的一样,classname参考了定义规则的实际类。
As you might have guessed, the class name refers to the actual class that defines the rule.
ValidationRule是规则引擎的抽象类,用来验证并格式化ViewController字段内容。
ValidationRule is an abstract class for a rule engine used to validate and format ViewController field content.
示例程序使用Drools规则引擎对machine类的实例求值。
The sample program USES the Drools rules engine to evaluate instances of the Machine class.
如果违反了以上任何一条规则,那么类装入器就会抛出ClassCastException。
If either of the above rules are violated, then a ClassCastException is thrown by the class loader.
一个基本的设计规则就是,一个类只要存在并去完成一个域包的目标,那么它就应该是该域包的一部分。
A fundamental design precept is that a class should be part of a domain package only if it exists to fulfill the goals of that domain package.
该文件应当包含一组完全符合规则的插件类名,其中每行显示一个类名。
This file should contain a list of the fully qualified plug-in class names, one per line.
以odr为中心的路由规则不应与在应用程序工作类上设置的路由规则混淆。
The ODR centric routing rules should not be confused with the routing rules set at the application work class.
一旦一个规则命令类被创建,它将在特定的规则引擎上被触发且执行正确的规则。
Once this rule command class is created, it is triggered to execute the correct rule in that specific rule engine.
每一步表达了一个新的映射规则,并解释了相关的概念;在需要的地方有类图描述规则。
Each step presents a new mapping rule and explains the related concepts; where meaningful, a class diagram illustrates the rule.
定义一个新规则的最后一步,是定义一个代表该规则的类。
The final step for defining a new rule is to define the class that represents it.
为了实现过滤,你可以严格定义使用的规则或者对一些限定的类应用特定的一些规则来进行代码复查。
To filter, you can either restrict the list of rules that are applied, or instruct Code Review to apply the rules to a limited set of classes.
数据模型使用一个规则来识别唯一可以识别类的实例的属性。
The data model uses an stereotype to identify attributes that uniquely identify instances of the containing class.
数据模型使用一个规则来识别唯一可以识别类的实例的属性。
The data model uses an stereotype to identify attributes that uniquely identify instances of the containing class.
应用推荐