对象有两个方面:成员变量和方法。
成员变量下面是属性和单击处理程序。
Below the member variables are the properties and the click handler.
第二个限制是结构的成员变量不能被提取。
The second limitation is that member variables of structures cannot be raised.
然后,清单6使用新定义的枚举作为一个成员变量的类型。
Then, Listing 6 USES the new enumeration as the type for the member variable.
您应该还记得第1部分中曾经提到,标记注释没有成员变量。
As you should remember from Part 1, marker annotations have no member variables.
只有在通过“Me”关键字访问的结构里的成员变量才不可用。
It is only the member variables within a structure accessed via the "me" keyword that cannot be used.
正如您所料,默认值的类型必须与成员变量声明的类型完全相同。
As you might expect, this must be the same type that you declared for the member variable.
首先我们设定Session变量为成员变量,而不是本地变量。
First, we promoted the session variable to be a member variable, rather than a local variable.
这意味着这些代码将直接存取成员变量表现为通过存取器方法访问。
What this means is that the code above really boils down to a case where you're accessing member fields through accessor methods.
当类的变量被声明为类的成员变量时,找到所有权关系是更加可靠的。
It was more reliable at finding ownership relationships when the variables were declared as member variables of the class.
观察该实现使用基础类中m_logger成员变量发出的跟踪事件。
Observe that the implementation emits trace events using the m_logger member variable from the base class.
然后将所有数据作为一个哈希表附加到剧集数组,该数组是一个成员变量。
It then appends all of that data as a hash table to the episodes array, which is a member variable.
也就是说,在 C++ 中,同一个类的对象无法看到彼此的私有成员变量。
That is, in C++, objects of the same class cannot see one another's private member variables.
也要注意,在线程中您不能修改stocks成员变量,正如您之前所做的。
Also, notice that, in the thread, you do not modify the stocks member variable, as you did previously.
这些元素可以与restaurantdetails类的成员变量相匹配。
These elements match up to the member variables of the RestaurantDetails class.
注意,因为两个提取方法都使用number成员变量,所以要涉及到超类。
Notice that because both of the extracted methods use the number member variable, it is dragged into the superclass.
此外,您常常需要在适当的时候将指向其他类的类成员变量设置为null。
Also, many times member variables of a class that point to other classes simply need to be set to null at the appropriate time.
如果您想为一个类的所有实例维持一个变量的实例,将会用到静态类成员变量。
If you want to maintain a single instance of a variable for all instances of a class, you will use static-class member variables to do it.
为了实践这些理论,让我们检查泛型信息是否保存在类的成员变量中。
To put this into practice, let us check if the generics information is kept on class fields.
该函数并不为一个成员变量获取值,当要设置一个成员变量时,才调用这个函数。
Instead of getting the value for a member variable, it's called when a member value should be set.
ContentAssist挑选出的其他成员变量来自后面定义的另一个类。
The other member variables Content Assist is picking up are from another class, defined later.
有了它,你可以在应用程序运行时添加/删除/修改方法,甚至成员变量。
With agent-based reloading, you can add/remove/change methods and even fields while your app is running.
获取XML文档中的数据并将其转换为多个对象中的成员变量数据涉及大量的处理工作。
A lot of processing is involved to take the data in an XML document and convert it into member variable data in multiple objects.
Sitebricks会自动将表单数据绑定到成员变量,正如对请求参数所做的那样。
Sitebricks will automatically bind the form data to the member variables, just as it would do for request parameters.
如清单12所示,这里可以使用简写形式,因为Retention只有一个成员变量。
As you can tell from Listing 12, you can use the shorthand form here, because Retention has a single-member variable.
成员变量保存配置项的列表,构造程序装入项,然后名为get的访问方法返回项的值。
A member variable holds the list of configuration items, a constructor loads the items, and an accessor method called get returns the value of an item.
同时给构造函数加上相应的参数,给构造函数的调用者加上一个成员变量来体现依赖关系。
Change it to a constructor argument at the same time, and make the caller have a member variable for that same dependency.
您一定还记得“第1部分”中曾经提到的,注释类型可以有成员变量(请参阅参考资料)。
As you'll remember from Part 1, annotation types can have member variables (see Resources).
具有不同生存期的对象之间的引用规则可能会禁止线程对象自身的成员变量包含对这些对象的引用。
The rules for references between objects of different lifetimes may prohibit member variables in the thread object itself from containing references to these objects.
不过要注意,只有当注释类型只有一个成员变量,而且变量名为value时,才能使用简写形式。
Take note, though — the shorthand version is available only if the annotation type has a single-member variable named value.
应用推荐