"I had to learn how to manage class behavior," she said. "it is totally different to China and I couldn't get used to it at first."
她说道:“我必须学习如何管理课堂行为,这和中国完全不同,我一开始不能适应这种情况。”
The easiest way to dynamically customize class behavior USES an imperative style: first create the class, then add methods and attributes.
利用强制方式动态自定义类行为最简单的方法是:首先创建类,然后添加方法和属性。
The rules for type parameters and constraints have several implications for generic class behavior, especially regarding inheritance and member accessibility.
型别参数和条件约束的规则有几个泛型类别行为含意,尤其与继承和成员存取范围有关。
For DI to work, you must have an interface whose concrete class you can inject into the consumer of the behavior you desire.
为了让DI工作,必须拥有一个接口,可以把这个接口的具体类注入到需要的行为的消费者中。
These patterns both extract behavior out of the view and into a presentation class coupled with the view.
两种模式都把行为从视图中抽出来,将之放入与视图耦合的一个表现类。
One of the major benefits of Design by Contract is that it provides explicit information within the interface or class itself about expected behavior.
契约式设计的一个主要优势是,它在接口或类本身当中提供了关于预期行为的显式信息。
I prefer specification of the runtime behavior of a class within the class itself, keeping all the information about a class in one place.
我更喜欢在类的内部说明类的运行时行为,将有关类的所有信息集中保存在一个地方。
They provide methods to let the tests control the behavior of all the business methods of the faked class.
它们提供了一些方法来让测试控制这个虚构类的所有业务方法的行为。
Sometimes, it's easier to copy and paste some code than to generalize the behavior into another class.
有时,复制粘贴某些代码要比将该行为泛化到另一个类更简单。
In the worst case, if the imports are concrete classes and their behavior changes, then the class doing the importing could break!
在最糟糕的情况下,如果导入的是具体的类,并且它们的行为发生更改,那么执行导入的类可能会中断!
The goal now is that you just annotate your class that implements the runtime behavior with the names of the labels and some other information.
现在的目标是你只需使用标签名和其他信息将实现了运行期行为的类注解起来就行了。
Groups of methods implementing a particular aspect of behavior can be gathered together in a mix-in that is added to any class that needs that behavior.
实现某一方面行为的方法组可以在混合式中聚集在一起,该混合式被添加到任何需要此行为的类中。
A well-implemented DAO class will use logging to capture details about its run-time behavior.
一个良好实现的dao类将使用日志记录来捕捉有关其运行时行为的细节。
In the case of a behavior port, calls on provided operations are handled by the class which owns the port.
如果是行为的端口,那么对提供的操作所做的访问是由拥有该端口的类处理的。
You can consider it when writing your classes to make sure that when you need to extend their behavior you don't have to change the class but to extend it.
你应该在编写类的时候考虑到它,以确保当你需要扩展它们的行为时,你不需要修改类实现,只需要扩展它。
Although providing a default behavior in a parent class is perfectly legal, it is probably not the neatest way of doing things.
虽然在父类中提供默认行为是完全合法的,但这可能不是最巧妙的方法。
When you want to add arbitrary behavior to a class, based on unknown criteria, you need to use a different technique.
当想要基于未知规则给一个类添加任意行为时,则需要使用一项不同的技术。
Everything else in the class is the same, including the behavior that models the service protocol.
类中的其它所有事情都是一样的,包括对服务协议进行建模的行为。
The idea behind class wrapping is that a target class can be wrapped in a layer of instrumenting code that retains the same external behavior as the class that's wrapped.
类包装背后的理念是:目标类可以包装在一层插装代码中,后者具有与被包装的类相同的外部行为。
The JSF component class defines the state and behavior of a UI component; a renderer defines how the component will be read from the request and how it will be displayed — usually though HTML.
JSF组件类定义UI组件的状态和行为;渲染器定义如何从请求读取组件、如何显示组件——通常通过html渲染。
Just as an MC is a special-purpose object, its definition is a special-purpose class which defines the structure and behavior of its instances.
正如MC是专用对象一样,其定义也是专用类,用于定义其实例的结构和行为。
It also demonstrates how the trait's behavior is "deferred" down into the implementing class.
它还表明特征的行为如何“下放到”实现类。
It publicly shames the students, removes them from the learning setting in class, and doesn't change their behavior.
这会让孩子当众感到羞愧,让他们离开原本坐在教室里学习的位置,却并没有改变他们的行为。
The CSS class links to a behavior in an HTC file.
CSS类链接到HTC文件内的一个行为。
Given that I'm probably going to be using a Stack instance throughout my behavior class, I might as well push (no pun intended) that logic into a fixture, as I've done in Listing 7.
由于我可能在整个行为类中使用一个Stack实例,我可能也会将那种逻辑推入(这里并非有意使用双关语)到一个fixture中,正如清单7中那样。
Martin Fowler describes it as: Putting all presentation state and behavior for a window in a single class.
MartinFowler的回答是:将一个窗口所有的表现状态和行为都放在一个类里。
ActiveRecord has a feature called polymorphic associations that is ideal for attaching common behavior to a class without inheritance.
ActiveRecord具有一种称为多态关联的特性,非常适合将通用行为附加给类,完全无需继承。
In an OO system, each class completely encapsulates the data and behavior of a specific concept.
在00系统中,每个类完全封装了特定概念的数据以及行为。
This example shows how to extend any Ruby class when you know the behavior at the time that you run the program.
这个例子展示了当您在运行程序时知道了该行为后该如何扩展Ruby类。
This example shows how to extend any Ruby class when you know the behavior at the time that you run the program.
这个例子展示了当您在运行程序时知道了该行为后该如何扩展Ruby类。
应用推荐