此重构操作生成的代码将由封装字段代码段功能来建模。
The code that is generated by this refactoring operation is modeled by the encapsulate field code snippets feature.
“封装字段”重构操作,可以从现有字段快速创建属性,然后使用对新属性的引用无缝更新代码。
Encapsulate field refactoring operation enables you to quickly create a property from an existing field, and then seamlessly update your code with references to the new property.
“封装字段”使用逗号作为字段之间的边界,并对与光标位于同一行且距离光标最近的某个字段启动重构。
Encapsulate field USES the comma as a boundary between fields, and initiates refactoring on the field that is nearest the cursor and on the same line as the cursor.
在面向对象设计中,传递对象通常能提供较好的封装,因为对象字段的变化不需要改变方法签名。
With object-oriented designs, passing the object often provides better encapsulation, in that changes in the object fields don't require changes to the method signature.
据我的经验,为了隐藏和封装信息,所有字段都应该声明为专用的。
In my experience, all fields should be declared private for purposes of information hiding and encapsulation.
不过,您可能并不想封装RationalFunctionalTester为操作文本字段提供的每一个方法。
However, you don't want to wrap every method that Rational Functional Tester provides for manipulating text fields.
显式布局:指定每个字段的偏移量,或者指定类大小和封装大小。
Explicit layout: Either specify the offset of each field or specify the class size and the packing size.
因此,数据字段将在偏移量上开始,偏移量是请求的封装值的倍数。
Therefore, data fields will start on offsets that are multiples of the requested packing value.
通过使用属性封装该字段,可以禁止对字段的直接访问。
By using properties to encapsulate that field, you can disallow direct access to fields.
偶尔,字段用于通过产生更紧密的封装大小来降低内存要求。
Occasionally, the field is used to reduce memory requirements by producing a tighter packing size.
不要强迫我访问不要所以额外写些代码去封装对字段a的修改过程。
Don't control object bother force me to write a special routine to encapsulate the modification of field a.
也可以通过在声明中选择该字段的名称来指定要封装的字段。
You can also specify which field you want to encapsulate by selecting the name of that field in the declaration.
封装值2和更高的值将导致字节上要对齐的每个字段相对于结构的开头进行偏置。
Packing values of 2 and higher will cause each field to be aligned on a byte offset relative to the beginning of the structure.
如果该字段自身是一个结构,则比较该结构的封装大小与结构中最大字段的大小,并使用两者中较小的值。
If the field is itself a structure, compare the packing size of that structure to the size of the largest field in that structure, and use the smaller of the two values.
计算字段的自然封装大小:如果该字段是简单数据类型,则使用该大小。
Compute the natural packing size for the field: If the field is a simple data type, use the size.
字段根据其自然大小或封装大小来对齐,以使字段偏移量最小的大小为准。
A field is aligned according to either its natural size or the packing size, whichever results in the smaller offset of the field.
字段根据其自然大小或封装大小来对齐,以使字段偏移量最小的大小为准。
A field is aligned according to either its natural size or the packing size, whichever results in the smaller offset of the field.
应用推荐