Add a getter and setter for the id attribute.
为id属性添加一个获得者以及设置者。
In reality, Groovy calls the default no-argument constructor first and then calls the appropriate setter for each field.
事实上,Groovy先调用默认的无实参构造函数,然后调用每个字段的相应setter。
In Listing 1, there are two possible implementations of a setter for a property that can only take on non-negative values.
在清单1中,有两个可能的用于特性的setter的实现,该特性只能接受非负数值。
With imports growing at 40 per cent a year, the world's workshop has become the price-setter for oil, metals, minerals and shipping rates.
目前,中国的进口正以年均40%的速度飞速增长。这个号称世界工厂的国家在石油、金属、矿物和海运等方面已经掌握了控价权。
If the setter for a read-write property throws an exception (such as IllegalArgumentException), JMX reports the exception back to the client.
如果读写属性的setter抛出异常(例如IllegalArgumentException),JMX就把异常报告给客户机。
As with the bike and bike store types, the Groovy's CommandLineView doesn't have the noise of an explicitly coded getter or setter for the RentABike property.
与Bike和自行车商店类型一样,Groovy的CommandLineView没有了为rentabike属性所显式编写的getter或setter的冗余。
This combination of still-subdued activity and high raw material prices illustrates a wider truth; that America is no longer the price-setter for these products.
疲软的经济和高价原材料证明了一个明显的事实:美国不再是这些产品的定价者了。
The eastern Chinese city of Wenzhou produces more cigarette lighters and spectacles than anywhere on earth, and has long been seen as an economic trend-setter for the entire country.
位于中国东部的温州市一向被视为中国经济的风向标,这里所生产的打火机和眼镜数量超过世界任何地区。
Now you need to create an implementation for Setter custom mediation primitive that puts the desired endpoint address in the transient context passed into Setter.
现在,您需要为Setter自定义中介元素创建实现,这个自定义中介元素在传递到 Setter 的瞬态上下文中指定了所需的端点地址。
Method chaining works best for the creation of simple data objects, yet here I'm using it both for the setter methods on Appointment and in AppointmentCalendar to start the method chain.
方法链接对于简单数据对象的创建最有效,但是这里我同时为Appointment上和AppointmentCalendar中的setter方法启用方法链接。
Notice what our code has so far: first, our Account class isn't a bean (it essentially has a getter -- but no setter -- for its one data member).
注意一下目前我们的代码有哪些东西:首先,我们的Account类不是一个bean (实际上,对于它的一个数据成员它有一个getter方法――但是没有setter 方法)。
Dependency injection can occur in a variety of ways, for example, via a setter method or a class variable.
依赖性的引入可以以多种方式出现,例如,通过设置属性值的方法或者类变量。
Although getter and setter methods are provided for these fields, they are never actually used in the auditing code.
尽管为这些字段提供了getter和setter方法,但是审计代码中实际上不使用这些方法。
It includes getter and setter methods for all the participant parameters, and it includes validation logic to ensure that all the required parameters for that particular method call are present.
它针对所有participant参数包含了getter和setter方法,并且包含了验证逻辑来确保给出了针对特定方法调用的所有必需参数。
These are marked as abstract, which results in Tapestry implementing them as simple "getter" and "setter" methods and creating a new variable for this class, of the type Order.
这两个方法被标记为抽象的,这样Tapestry会把它们实现为简单的“getter”和“setter”方法,并为这个类创建类型为Order的新变量。
To facilitate this setter injection, I've registered set methods for both my properties.
为了方便这个setter注入,我为两个属性都注册了set方法。
The EJB 3.0 specification talks about public field injection and setter injection, but constructor injection will enable you to avoid creating setters for values you don't expect to change.
EJB 3.0规范谈到了公共字段注入和setter注入,但构造器注入将使您可以避免为预期不会更改的值创建setter。
The problem with using classes for structured data is that each class has its own distinct interface for accessing that data, typically through getter/setter methods.
将类用于结构化数据的问题就是为了访问此数据每一个类都有其自己不同接口,通常通过getter/setter 方法。
Generate getter and setter methods for these variables.
为这些变量产生获得和设置属性值的方法。
The initialization code in Listing 2 is part of a class that uses setter injection for DI.
清单2中的初始化代码是一个类的一部分,它使用setter注入进行DI。
You must have a setter and getter method for network-transfer fields.
您必须具有用于网络传输字段的setter和getter方法。
For example, if you select a field that has getter and setter methods, you can also update the names of these methods to reflect the new field.
比方说,如果选择的属性具有getter和setter方法,那么也就可以同时更新这些方法的名称,以反映新的属性。
The compiler provides a set of public getter and setter methods for each property automatically.
编译器将为每个属性自动提供一组publicgetter和setter方法。
You must have a setter and getter method for the fields that need to transfer over the network.
您必须具有用于需要在网络上传输的字段的setter和getter方法。
Because databases do not support behavior associated with entities, the domain model ended up having simple variables with getter and setter methods for them.
因为数据库不支持与实体相关联的行为,领域模型最终只具有简单的变量以及相关的getter和setter方法。
The Struts system will generate a pair of getter and setter methods for each form property in the form bean class.
Struts系统会在Formbean类中为每个表单属性生成一对getter方法和setter方法。
Because we are dealing with simple accessor methods for beans, we have one for the setter containing a single input message, and one for the getter containing a single output message (see listing 4).
因为我们是为bean处理简单的访问方法,所以包含一个输入消息的setter和包含一个输出消息的getter都有一个。如清单4所示。
Also, if a particular getter or setter requires special attention, you don't have to sift through dozens of lines of code to find the one you are looking for.
并且,如果有一个特定的getter或setter需要特别的注意,那么您就不必为了找到这个特定的 getter 或 setter 而遍历数十行代码。
The aspect provides a setter to define which MBean server should be used for managing objects.
这个方面提供了一个设置器,定义应当用哪个MBean服务器管理对象。
Call setter methods for each nested element to automatically configure the properties of the object.
对嵌套的每个元素调用setter方法自动配置对象的特性。
应用推荐