Other features include class invariants, non-nullable reference types, and enhanced static analysis capabilities.
其他的特性还包括类不变量、非空引用类型和加强的静态分析功能。
There are also loop invariants and a few others, but pre - and post-conditions and class invariants are really the basic fabric of contracts.
还有循环不变式等等,但前置、后置条件和类不变式是基本要素。
There are also loop invariants and a few others, but pre contract element condit- and post-conditions and class invariants are really the basic fabric of contracts.
还有循环契约要素条件不变式等等,但前置、后置条件和类不变式是基本要素。
OVal isn't the only DBC library available, and in fact its DBC constructs are fairly limiting compared to other frameworks (for example, it doesn't offer an easy way to specify class invariants).
OVal并不是惟一可用的dbc库,事实上其DBC结构对比其他框架来说是相当有限的(例如,它未提供指定类不变式的简易方法)。
Object Invariants are conditions specified for each instances of a class.
对象不变量则为每个实例指定条件。
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.
比如,很多类或方法常量首先作为JUnit断言写入,如果不自动触发异常这些常量,则可以在产品诊断中重复使用它们。
For example, they can help you test your custom Exception class, verify that your datatype's Equals & GetHashCode are consistent, and check IList invariants.
例如,它可以帮你测试自定义的异常类,验证自定义类型的Equals和GetHashCode方法是否一致,以及检查IList的不变性。
The concept of Design by Contract allows you to define some constraints and invariants of your class. Statically typed languages have a primitive version of this.
契约设计这样的概念允许我们在类中定义一些约束和限制。
The concept of Design by Contract allows you to define some constraints and invariants of your class. Statically typed languages have a primitive version of this.
契约设计这样的概念允许我们在类中定义一些约束和限制。
应用推荐