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.
我们将用一个例子来更好地展示静态横切是怎样在一个现有的类中实现的。
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.
为了测试,总可以动态地改变类的定义。
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.
“添加到现有文件”以在现有类文件中生成类代码。
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.
继承就是基于已有的类进行修改来获取新类的能力。
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中则没有这种功能。
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.
或者更糟,假设我们准备写一个程序,但在创建它的时候,却向自己的库加入了一个新类,它与现有某个类的名字发生了冲突。
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。
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。
应用推荐