Eclipse书籍部分翻译(英译中)11

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Eclipse书籍部分翻译(英译中)11相关的知识,希望对你有一定的参考价值。

The assumption here is that the client's classloader is able to load all required classes. This may or may not be true. Even if it can, the coding pattern is cumbersome to use and hard to maintain for any significant number of library calls. Ideally, log4j would be able to dynamically discover the context relevant to a particular classloading operation. Eclipse enables this using the context finder.
The context finder is a kind of ClassLoader that is installed by Eclipse as the default context classloader. When invoked, it searches down the Java execution stack for a classloader other than the system classloader. In the AppenderHelper example above, it finds the log4j plug-in's classloaderthe one that loaded AppenderHelper. The context finder then delegates the load request to the discovered classloader.
This mechanism transforms log4j's call to getContextClassLoader(). loadClass(String) to the equivalent Class.forName(String) call using log4j's classloader to load the given class. Now the buddy classloading techniques discussed in Section 20.5.1 can be applied to help log4j load the needed appender classes.
The net effect is that clients of log4j do not have to use the cumbersome coding pattern outlined above even though the libraries they call use the context classloader. This approach generalizes to other context classloading situations.
Managing JRE Classes
For various reasons, some libraries include packages that are normally found in the JRE. For example, version 2.6 of Xalan, the XML transformation engine, comes with types from the org.w3c.dom.xpath package in xalan.jar. These types are also included as part of typical JRE distributions. When xalan.jar is used as part of a normal Java application, it is added to the classpath, but its xpath classes are obscured by those in the JRE. Everything is fine.
When you bundle Xalan, the tooling produces Export-Package enTRies for all packages in xalan.jar. However, the tooling cannot know that it should add imports for the org.w3c.dom.xpath package found in the JRE. Without the import, Xalan uses its own copies of the xpath types and may conflict with those supplied by the JRE.
This happens because Eclipse 3.1 plug-in classloading is highly optimized. These optimizations depend on the plug-in manifest information to know which packages come from which plug-ins. Except for the use of certain buddy policies, the classloaders never search for classesthey always knows exactly where to find them.
For the JRE packages, only java.* packages are assumed to come from the boot classloader. All others must be imported in the consuming plug-in's MANIFEST.MF. The API packages included in the JRE are typically exported by the system bundle (i.e., org.eclipse.osgi or system.bundle). This list is captured in a JRE profile.
这是计算机Eclipse的书籍中的关于插件和打包那部分的外文词汇,其中的Chapter N是指书中第N章。这些是专业词汇的翻译,我要的是通顺的、尽量正确的中文译文。。。。谢谢大家!

这里的假设是,客户端的类加载器可以加载所有必需的课程。这可能是也可能不是真的。即使可以,编码模式是繁琐的使用和难以维持的任何相当数量的图书馆电话。最理想的是, log4j将能够动态发现相关的背景某一classloading运作。这使Eclipse的使用范围查找。
背景查找是一种类加载器是安装的Eclipse作为默认的背景类加载器。当调用,它搜查了Java运行栈的类加载器以外的系统类加载器。在AppenderHelper上述范例中,它发现了log4j插件的classloaderthe一个装货AppenderHelper 。背景查找然后代表的负荷要求发现的类加载器。
这种机制转换log4j的呼吁, getContextClassLoader ( ) 。 loadClass (弦乐)相当于Class.forName (弦乐)呼叫使用log4j的类加载器来加载特定类别。现在的好友classloading技术讨论20.5.1节中可用于帮助log4j负载所需要的appender班。
净效果是,客户log4j不必使用繁琐的编码方式上文所述,尽管他们称之为图书馆的范围内使用类加载器。这种做法推广到其他方面classloading情况。
班级管理JRE环境
由于各种原因,一些图书馆包括软件包,通常是发现了JRE环境。例如, 2.6版的Xalan的XML转换引擎,配备各类org.w3c.dom.xpath从包中xalan.jar 。这些类型还包括一部分典型的JRE环境分布。当xalan.jar是用来作为正常的Java应用,它被添加到类路径,但它的XPath类所掩盖那些在JRE环境。一切都很好。
当您捆绑Xalan ,模具生产出口包装的项目在所有软件包xalan.jar 。然而,刀具无法知道,它应该增加进口org.w3c.dom.xpath包中发现JRE环境。如果没有进口, Xalan使用自己的副本的XPath类型,并可能与这些冲突所提供的JRE环境。
这是因为Eclipse的3.1插件classloading是高度优化的。这些优化依赖于插件清单信息知道哪些包来自该插件。除使用某些好友的政策,从来没有classloaders搜索classesthey总是确切地知道在哪里可以找到他们。
对于JRE环境的软件包,只有爪哇.*包被假定为来自引导类加载器。所有其他进口必须在消费插件的MANIFEST.MF 。空气污染指数的软件包包括在JRE环境通常是出口的捆绑系统(即org.eclipse.osgi或system.bundle ) 。这份名单是在抓获JRE环境形象。//ok, i give u a little help
参考技术A 这里的假设是,客户端的类加载器可以加载所有必需的课程。这可能是也可能不是真的。即使可以,编码模式是繁琐的使用和难以维持的任何相当数量的图书馆电话。最理想的是, log4j将能够动态发现相关的背景某一classloading运作。这使Eclipse的使用范围搜寻背景查找是一种类加载器是安装的Eclipse作为默认的背景类加载器。当调用,它搜查了Java运行栈的类加载器以外的其他系统

以上是关于Eclipse书籍部分翻译(英译中)11的主要内容,如果未能解决你的问题,请参考以下文章

翻译 英译中 目录导航

求:关于股票名词释义的准确翻译(英译中),软件翻译莫进!

大学英语综合教程三 Unit 1至Unit 8 课文内容英译中 中英翻译

大学英语综合教程四 Unit 1至Unit 8 课文内容英译中 中英翻译

论文翻译

求助英译中 The effect of concession period design on completion risk management of BOT projects