Most, if not all, problems relating to class loading can be tracked down to a problem occurring in one of these phases.
虽然不是所有的问题,但至少大多数与类装入有关的问题都可以追溯到在这三个阶段中发生的某个问题。
This article, the second in a series of four, looks at the various class loading exceptions typically thrown when running applications.
本文是系列中四篇文章的第二篇,它考察了一般在运行应用程序时抛出的各种类装入异常。
Any new implementation for loading people from a store does not require any changes in the class that USES the factory and interface.
从数据库中装入人员的任何新实现都不要求在使用工厂和接口的类中进行任何更改。
Dynamic class loading, which is a challenge for the dynamic JIT compiler, is an even more significant issue for AOT compilation.
动态类加载是动态jit编译器面临的一个挑战,也是AOT编译的一个更重要的问题。
Many developers find constraint violations to be a difficult type of class loading problem to resolve.
许多开发人员发现约束违反是一种很难解决的类装入问题。
This section describes the core concepts of class loading to provide a knowledge base for the rest of this series.
这一节描述类装入的核心概念,为系列剩下的部分提供知识基础。
Rarely executed paths are one common reason for a new class loading.
很少执行的路径是加载新类的一个常见原因。
As with explicit class loading, if the class is already loaded, then a reference is simply returned; otherwise, the loader goes through the delegation model to load the class.
与显式类装入一样,如果类已经装入了,那么只是返回一个引用;否则,装入器会通过委托模型装入类。
As each anonymous class has a unique name there are no issues loading it and as a result the application is updated on-the-fly.
因为每个匿名类都有一个唯一的名称,因此在加载该类是不会有问题的,而这样做的结果是,应用被实时动态地更新了。
The loading of a class can essentially be broken down into three phases: loading, linking, and initializing.
类的装入实际上可以分成三个阶段:装入、链接和初始化。
Classes are often loaded through a combination of explicit and implicit class loading.
类的装入通常组合了显式和隐式类装入。
While deploying, class loading conflicts are resolved by using a different application class loader for each enterprise application module.
在部署阶段,类加载冲突通过对不同的企业应用程序模块使用不同的应用程序类加载器得以解决。
When subsequent requests for that class are made, these requests are satisfied from the cache if possible rather than loading the class from a corresponding JAR file.
当以后请求这个类时,会尽可能通过缓存满足请求,而不必从对应的JAR文件再次装载这个类。
The IBM Verbose class Loading option is a great way to check what the classpaths for all class loaders have been set to.
IBM详细类装入选项是检查所有类装入器设置的类路径的好方法。
A good example of this class loading structure is an OSGi framework, such as the one Eclipse is built on.
这种类装入结构的示例就是OSGi框架,例如eclipse构建于其上的框架。
Class loading consideration for channel exits with the WebSphere MQ messaging provider is covered in a later section in this article.
有关带有WebSphereMQ消息提供程序的通道出口的类加载考虑事项,将在本文的下一节介绍。
Explicit class loading occurs when a class is loaded using one of the following method calls.
显式类装入发生在使用以下方法调用装入的类的时候。
You might recall that the xm builder I wrote in previous columns provided both a class name (to load the plug-in) and a project nature (to decide whether it's worth loading the plug-in) in plugin.xml.
您可能还记得上一期文章中编写的xmbuilder,它在plugin . xml中提供了类名(以便加载插件)和项目特性(确定是否需要加载该插件)。
Every class loader has a parent class loader, which delegates the searching and loading of a class to its parent (parent-first delegation) before it attempts to load the class itself.
每个类加载器有一个父类加载器,在尝试加载类本身时,先将类搜索和类加载委托给它的父加载器,即父加载器优先(parent-first)委托。
A class that implements the org.relaxng.datatype.DatatypeLibrary interface: This class is responsible for loading the right datatype class given the type's local name.
实现or g. relaxng .datatype . DatatypeLibrary接口的类:给定类型的本地名之后该类负责加载适当的数据类型类。
A factory class that implements the org.relaxng.datatype.DatatypeLibraryFactory interface: This class is responsible for loading the right datatype library given the library's namespace URI.
实现or g . relaxng .datatype . DatatypeLibraryFactory接口的工厂类:给定类型库的名称空间uri后,该类负责加载适当的数据类型库。
OSGi provides among other things the component model, a deployment mechanism for modules and a clean class loading system.
OSGi提供了组件模型,一个模块部署系统,以及一个cleanclass加载系统。
To access generics information without loading classes into the JVM, you need a way of reading the generics information stored inside the binary class representation.
要想在不将类载入JVM的情况下访问泛型信息,您需要一种读取存储在二进制类表示内的泛型信息的方法。
Note that class loading can be performed in a lazy manner and therefore some parts of the class loading process may be done on first use of the class rather than at load time.
请注意可以用惰性方式执行类装入,所以类装入过程的某些部分可能在第一次使用类的时候才执行,而不是在装入时执行。
Implicit class loading occurs when a class is loaded as result of a reference, instantiation, or inheritance (not via an explicit method call).
隐式类装入发生在由于引用、实例化或继承导致装入类的时候(不是通过显式方法调用)。
Class loading in a JVM is controlled by class loaders.
装入到JVM的类是由类装入器控制的。
The JVM records this signature information when loading a class and makes it available at run time using reflection.
JVM在装载类时记录这个签名信息,并在运行时通过反射使它可用。
A generic technique to avoid class-loading delays during the time-sensitive parts of your application is to preload classes during application startup or initialization.
一种在应用程序的时间敏感型部分避免类加载延迟通用技术是,在应用程序启动或初始化期间预先加载类。
You can build a model of this type by using reflection, after first loading the target program's class files into the JVM.
可以利用反射,在第一次把目标程序的类文件装入 JVM 之后,创建这种类型的模型。
Within the JVM, the loading process gives a very basic memory structure to the class object.
在JVM中,装入阶段为类对象提供了非常基本的内存结构。
应用推荐