Extension methods enable you to add methods to an existing class.
通过使用扩展方法,可以将方法添加到现有类中。
Renaming, deleting, or changing the inheritance of an existing class.
重命名、删除或更改现有类的继承。
Add to existing file to generate the classes code into an existing class file.
“添加到现有文件”以在现有类文件中生成类代码。
But how can that work if the class loader looks for existing class files for each class it loads?
但是,如果类装入器为它所装入的每个类查找现有类文件,那么它会如何工作呢?
We'll use an example to better see how static crosscutting can be implemented in an existing class.
我们将用一个例子来更好地展示静态横切是怎样在一个现有的类中实现的。
Inheritance is the ability to define a new class that is a modified version of an existing class.
继承就是基于一个已有的类进行修改来定义一个新的类。
Inheritance is the ability to define a new class that is a modified version of an existing class.
继承就是基于已有的类进行修改来获取新类的能力。
Next create a new service class from any existing class by selecting an existing class and entering 1 for the action.
下一步,通过选择某个现有分类并输入1作为操作,从而在任何现有分类的基础上创建新的服务分类。
Either use the browse button to browse to an existing class, or manually enter a valid class name in the text box.
使用Browse按钮浏览现有的类,或在文本框中手工输入有效的类名。
The idea behind these tools is that you can use an existing class as the template for your run-time class generation.
这些工具背后的思路是:可以将现有的类用作生成运行时类的模板。
For testing purposes, you can always change the definition of the class on the fly. You can open the existing class later.
为了测试,总可以动态地改变类的定义。
Suppose you want to change the type of a field in an existing class, for example by changing Person's age from an integer type to a short type?
假设要更改已有类中一个字段的类型,例如将Person的age从整型改为短整型。
This method gets called after all the existing class information has been visited, so it's a convenient place to implement the addition of new content.
该方法在所有的已有类信息都已经被访问之后调用,所以它对于添加新内容非常方便。
The language includes a construct (a category) that allows the programmer to add new methods to an existing class; this is not a capability provided by UML.
这种语言包含一种结构(category),它允许程序员给一个已经存在的类添加新的方法;uml中则没有这种功能。
The object model supported single inheritance, which let users extend (specialize) an existing class without having to write it from scratch or copy it.
对象模型支持单一继承,能让用户扩展(系列化)一个存在的类,而不用从头再写或复制。
You can modify an existing class, pass it as a parameter, and take advantage of the API without requiring the base API to declare an abstract class or interface.
您可以修改已有类,将它作为参数传递,并利用API,而不需要基础 API声明一个抽象类或接口。
Or worse, imagine that you're writing a program, and as you're building it you add a new class to your library that conflicts with the name of an existing class.
或者更糟,假设我们准备写一个程序,但在创建它的时候,却向自己的库加入了一个新类,它与现有某个类的名字发生了冲突。
This use case is an extension of the bottom-up scenario with the added complexity of synchronizing existing class models in RSA with the new or modified information.
这个用例非常类似于自下而上场景,只是另外还需在RS a中用新的或被修改的信息同步已有的类模型。
For example, TransactionProxyFactoryBean is a convenience proxy class that can intercept method calls to an existing class and apply a transaction context to a transaction bean.
例如,TransactionProxyFactoryBean是个方便的代理类,能够拦截对现有类的方法调用,并把事务上下文应用到事务bean。
The most common mistake with bounded wildcards is forgetting to use them at all, restricting the utility of a class or forcing users to jump through hoops to reuse an existing class.
最常见的有界通配符错误就是忘记使用它们,这就限制了类的使用,或是强制用户不得不重用现有的类。
You can also use the two sides together, intercepting the stream of events generated from an existing class to make some changes and feeding the altered stream back into the generation of a new class.
也可以使用双向方法,截住由现有类生成的事件流,做一些修改,并把修改后的事件流送回生成新类的事件流。
Inheritance allows you to reuse and customize existing code inside a new class.
继承允许您在新的类中重用和自定义现有的代码。
In particular, each existing shape class has to add capabilities in a descendent, which runs into combinatorial complexities and difficulties in maintenance.
特别是,每个现有的形状类必须在子代类中添加功能,这使维护工作陷入了组合的复杂性和困难当中。
Whenever you define a new class as an extension of an existing one, the new class is said to be a subclass of the original.
任何时候你定义一个新类继承自已有的类,这个新类就叫做已有那个类的子类。
You started by turning existing code into a class diagram so that you had a picture of how your code looks as a model.
首先你把代码转化为类图,这样一来你的代码看起来就像是一个模型。
In this case, the exponentiation operator is another form of binary operator so the existing BinaryOp case class serves.
在本例中,求幂运算符是另一种形式的二进制运算符,所以使用现有BinaryOp case类就可以。
In my DAO implementation, I use introductions to add a number of finder methods to my existing generic DAO class.
在我的DAO实现中,我使用introductions将许多查找器方法添加到现有泛型dao类中。
Instead, you'll explore a couple of different techniques that will allow your existing Airport class to map seamlessly to the new, different table schema behind the scenes.
相反,本文不需要这样做,而是探讨几种不同的技术,在后台将现有的Airport类无缝映射到新的、不同的表模式中。
Instead, you'll explore a couple of different techniques that will allow your existing Airport class to map seamlessly to the new, different table schema behind the scenes.
相反,本文不需要这样做,而是探讨几种不同的技术,在后台将现有的Airport类无缝映射到新的、不同的表模式中。
应用推荐