Considering getters and setters.
关于getter和setter。
(Note that I've omitted getters and setters.)
(注意,我删除了其中的getters和setters。)
Listing 3. Value and reference semantics for getters and setters.
清单3.getters和setters的值语义以及引用语义。
An advanced use of getters is to obtain the values of constants.
getter的一种高级用法是获取常数值。
There are additional array attributes (not just getters and setters).
出现了附加的数组属性(不再只有getter和setter)。
Those getters and setters should be modified for your own implementation.
您应该为自己的实现修改那些getter和setter。
Most of this is just boilerplate code: several fields with getters and setters.
这段代码的大部分都是样本文件代码:几个字段和一些 getter 和 setter 方法。
It's not hard to write tests that cover simple methods like setters and getters.
编写覆盖像setter和getter这样简单方法的测试代码并不难。
It also generates getters for the attributes defined - in this case, uom and amount.
它还为定义的属性(在这里就是uom和amount)生成getter方法。
As with "regular" descriptors, the idea is to define "getters," "setters," and "deleters".
与 “常规”描述符一样,特性的工作原理就是定义 “getters”、“setters”和 “deleters”。
Each data object provides read and write access methods (getters and setters) for its properties.
每个数据对象都为属性提供了访问和设置方法(getter和setter)。
You can then use simple getters and setters to retrieve the values of the child elements in the XML.
您可以使用简单的getter和setter检索XML 中子元素的值。
The result is a greatly simplified API, with the collapsing of the many type-specific getters/setters.
结果是通过压缩许多特定于类型的getter/setter,大大简化了API。
In particular, it is not very Pythonic to access data using getters and setters, or other similar methods.
具体地说,使用getter和setter或其他类似的方法来访问数据不太符合Python的习惯。
Create getters and setters for the four fields by following the method shown in Listing 1 for the symbol field.
按照清单1中显示的用于symbol字段的方法为以上4个字段创建getter和setter。
Figure 7 shows a Velocity template that is used to generate the getters for all the fields defined on an entity.
图7展示了用于生成获得实体中定义的所有字段的getter的Velocity模板。
It has fields corresponding to the database columns and the usual accessors (getters and setters) for each field.
它有与数据库列对应的字段及用于每个字段的常用存取器(getter和setter)。
ConfigGetter inherits from ConfigAccessorMethod, shown in Listing 18, which provides support for setters and getters.
如清单18所示,ConfigGetter继承ConfigAccessorMethod,提供对setter和getter的支持。
Accessor methods come in two flavors: setters and getters (sometimes referred to as mutators and accessors, respectively).
访问器方法涉及两种方法:setters和getters(有时分别称为mutators和accessors)。
Note that this is only a partial listing of the class; some helper methods and the getters and setters have been omitted.
注意,这个清单仅是该类的一部分;省略了一些helper、getter和setter函数。
The properties that are getters, not Fields, all have to be queried for in some special way from the OmniFind repository.
对于属于getter而不是Field的属性,必须能够以某种特殊方式从OmniFind存储库进行查询。
Once you have added your objects to your object maps, you can generate your getters automatically by writing a few lines of code.
一旦你将你的对象添加到你的对象地图中,就可以通过编写几行代码自动产生你的getter方法。
Rather than using attribute specific getters, the v2.0 plug-in JSP needs to use generic name / value pairs to retrieve attributes.
插件JSP不是使用特定于属性的getter 方法,而是使用通用的名/值对来获取属性。
Add the mediation parameters with the appropriate "setters and getters" and logging references to the class, as shown in Listing 5.
向该类添加具有恰当setter和getter方法的中介参数及记录引用,如清单5所示。
It accomplishes these tasks by overriding the beforeExecute() and afterExecute() hooks and providing getters to retrieve the collected data.
它通过覆盖 beforeExecute()和afterExecute()挂钩,并提供能检索所搜集数据的getter,实现这些任务。
The class also has the usual getters and setters, but they are not shown for the sake of brevity (see Downloads for the full code listings).
该类还有常用的getter和setter,但是为了简短起见并未显示(请参阅 下载 以获得完整的代码清单)。
A property is just a thing that looks like an attribute syntactically (as used), but is defined by defining all the getters, setters, and so on.
特性其实就是在语法上与属性类似的一种东西,通过定义所有getters、setters等就可定义特性。
Netbeans has some code generation features that are similar to refactoring, such as the ability to generate getters and setters for class attributes.
Netbeans具有一些类似于重构的代码生成特性:例如,为类属性生成getters和setters的功能。
For instance, when I create a new class, I no longer spend any time writing setters and getters (accessors). I don't write most of the constructors.
例如,创建新类时,我不再花时间编写setter和getter(访问器),也不用编写大部分的构造器。
AspectJ intertype declarations are used to automatically generate ID and version fields, and getters and setters for persistence fields in domain classes.
AspectJintertype声明用于自动生成id和版本字段,以及域类中持久化字段的getters和setters。
应用推荐