类型同为Foo的两个对象可直接访问对方的私有字段。
Two objects each of type Foo can directly access each other's private fields.
使用私有字段并注释setter方法被视为最佳做法。
Using a private field and annotating the setter method is considered a best practice.
订单表单包括几个私有字段,只供运输公司追踪订单时使用。
The orders form contains several private fields that are only to be used by the shipping company to track orders.
属性是提供一个灵活的机制来读取、写入,或计算私有字段的值的成员。
A property is a member that provides a flexible mechanism to read, write, or compute the value of a private field.
当代码中存在私有字段,但是任何代码路径都未使用它时,将报告此规则。
This rule is reported when a private field in your code exists but is not used by any code path.
属性是这样的成员:它们提供灵活的机制来读取、编写或计算私有字段的值。
Properties are members that provide a flexible mechanism to read, write, or compute the values of private fields.
这可以通过创建一个私有字段并在附加到此事件之前或之后向处理程序赋值来实现。
This can be accomplished by having a private field and assigning the handler as the value before or after attaching to this event.
所以,如果属性名为“FirstName”,那么对应的私有字段名为“_ FirstName”。
So if you property is named "FirstName", there will be a matching private field called "_firstname".
反射将使得应用程序可以直接访问这些私有字段,允许参数处理库在应用程序代码中没有任何特殊钩子的情况下设置参数的值。
Reflection will give direct access to these private fields, allowing the argument processing library to set values without any special hooks in the application code.
问题在于Posts包含一个名为_ count的私有字段,该字段必须进行序列化和反序列化,才能完全冻结和重新冻结类实例。
The problem is that Posts contains a private field named _count that must be serialized and deserialized to fully hydrate and rehydrate class instances.
正如其名称所示,这个ConvertLocalVariabletoField重构能够获取一个本地变量并将这个变量转换为此类的一个私有字段。
As the name suggests, the convert local variable to field refactoring takes a local variable and converts it to a private field of the class.
换句话说,你希望字段是私有的。
主题和响应有一个Boolean字段可将它们标记为私有或公有。
The topics and responses have a Boolean field to mark them private or public.
我们在选项字段中提供keystore文件的位置、keystore密码和私有密匙密码。
In the options fields, we provided keystore file location, keystore password, and private key password.
然后定义book类,用私有成员变量代表每个字段。
The Book class is then defined, with private member variables for each field.
如果用户选择将主题或响应设为私有,则用户被添加到Readers字段。
If the user chooses to make the topic or the response private, the user is added to the Readers field.
如果你在高性能的Hotspot中使用这些代码,可以通过声明被内部类访问的字段和成员为包访问权限,而非私有。
If you're using code like this in a performance hotspot, you can avoid the overhead by declaring fields and methods accessed by inner classes to have package access, rather than private access.
如果您认为Guice访问私有方法不是很好,可以参见清单10,其中FrogMan使用了字段注入。
If you think Guice's decision to access private methods seems intrusive, wait until you see Listing 10, in which FrogMan USES field injection.
第一个是可见性标记(visibility marker),可以将字段、方法和类标记为公共的、受保护的、私有的或默认的可见性。
The first is a visibility marker that marks fields, methods, and classes for either public, protected, public, or default visibility.
开始隐藏信息的一种简单方法是保持字段私有并且用公共访问方法公开这些字段,就像家中的窗户一样。
One simple way to begin hiding your information is to keep fields private and to expose them with public accessors, which are like Windows in your house.
通常应仅为具有私有或受保护可访问性的变量使用字段。
Generally, you should use fields only for variables that have private or protected accessibility.
通常应仅为具有私有或受保护可访问性的变量使用字段。
Generally, you should use fields only for variables that have private or protected accessibility.
应用推荐