Add methods, properties, and events.
添加方法、属性和事件。
Firstly, never add methods that might be useful in the future.
首先,不要加入将来才可能用到的方法。
How does that help us add methods to a class at runtime, though?
如何帮助我们购买方法一类在运行时,虽然?
Extension methods enable you to add methods to an existing class.
通过使用扩展方法,可以将方法添加到现有类中。
You might decide later that you want to add methods to a named tuple.
有时候你可能想给一个命名元组添加方法。
You can also add methods and data to existing Ruby classes because classes are open.
还可以添加方法和数据到已有的类中,因为类是开放式的。
In Listing 5, we add methods for setting and accessing data in browser cookies.
清单5中添加了在浏览器cookie中设置和访问数据的方法。
Add methods to the mock object that allow you to initialize it properly for your tests.
在模拟对象里添加方法,使得您的测试正确地初始化。
Programmers often need to add methods to classes that are part of the language runtime itself.
开发人员经常有向某一语言内建类中添加方法的需求。
Here's the punchline: the moment we can add methods to classes this "simple check" is not enough.
于是就有了这样可笑的事:在我们能够添加方法到类中的时候,这种“简单的检查”是不够的。
I can add methods to several callbacks at the bean level, but there is no filtering technology.
我可以向be an级的一些回叫信息中添加办法,但是没有过滤技术。
The EMC allows you to add methods to either a single instance or all instances of a particular class.
EMC允许您将方法添加到某个类的单一实例或所有实例中。
Firstly, never add methods that might be useful in the future. Be minimalist, get away with as little as possible.
首先,严禁增加将来可能有用途的方法。确定系统的最小化,尽可能地小。
JiBX USES bytecode enhancement to add methods to compiled classes that convert instances of the classes to and from XML.
JiBX使用字节码增强向编译后的类添加方法,以便在类的实例与XML之间进行转换。
As you can see, defining a Category allows you add methods to some instances - only the instances inside of a use block.
可以看到,定义Category允许您将方法添加到特定实例中—只限于use块内部的实例。
The interface extension feature of XMLBeans allows you to add methods with custom implementation for the generated POJOs.
XMLBeans的接口扩展特性允许在生成的POJO中添加具有定制实现的方法。
Therefore, you add methods to the portlet service which the portlets set prior to calling any of the business methods.
因此,将portlet设置在调用任何业务方法之前的方法添加到portlet服务中。
If we add methods that should not be there the classes implementing the interface will have to implement those methods as well.
如果我们增加了不应有的方法,继承这个接口的类将不得不同时实现这些方法。
Next, let's add methods to each of the classes to simply wrap the methods defined for the TableAdapters from the first tutorial.
接下来,让我们来给这些新建的类加上一些方法,简单的将第一节中的TableAdapter中的那些方法包装起来就行了。
You can use any (or all) of the techniques outlined in this article to add methods easily to one, some, or all of the classes you want.
您可以使用本文介绍的任何(或所有)技巧来向任意数量的类添加方法。
The easiest way to dynamically customize class behavior USES an imperative style: first create the class, then add methods and attributes.
利用强制方式动态自定义类行为最简单的方法是:首先创建类,然后添加方法和属性。
Of course, what I provide in these two articles is just an example: to use the generator, you have to implement the DatabaseTable base class, then add methods for deleting and updating.
当然,这两篇文章中所举的仅仅是一个例子,要使用生成器还必须实现DatabaseTable基类,并增加删除和更新的方法。
By saying nothing more than acts_as_tree in your ActiveRecord model, you can dynamically add methods to manage the tree, such as methods that retrieve the parent record or child record.
通过使用ActiveRecord模型中的acts_as _ tree,可以动态地添加方法来管理树,比如检索父记录或子记录的方法。
It includes methods to add and delete bookmarks, retrieve a user's bookmark list, and retrieve (or rename) a user's tags.
它包括添加和删除书签、检索用户书签列表和检索(或者重命名)用户标记的方法。
These methods all add or replace data.
这些方法都是添加或替换数据。
Instead, I add extra methods to the subclasses that perform the appropriate action for each subclass.
相反,我向为每个子类执行适当的操作的子类添加额外的方法。
But, one of the unfortunate properties of interfaces is that once we specify them, we cannot add new methods without breaking existing implementations.
但是,接口的不良属性之一是:在我们指定该属性之后,就无法在不破坏现有实现的情况下添加新方法。
These are the actions to which you shortly will add REST methods.
这是一些您马上将向它们添加REST方法的操作。
You can add new methods to fit the use cases of your application.
您可以添加新方法,以符合您的应用软件的用例。
You can add new methods to fit the use cases of your application.
您可以添加新方法,以符合您的应用软件的用例。
应用推荐