@Deprecated public class DefaultLoaderRepository extends Object
保持类加载器在MBean服务器的注册名单。它提供了使用注册类装载器加载类的必要方法。
这个过时的类保持兼容性。在以前版本的JMX API,有一DefaultLoaderRepository
所有MBean服务器共享。作为1.2版本的JMX API,这些功能是通过使用MBeanServerFactory.findMBeanServer(java.lang.String)
找到所有已知的MBean服务器近似,和咨询的每一个ClassLoaderRepository
。这是强烈建议代码引用DefaultLoaderRepository
被改写。
Constructor and Description |
---|
DefaultLoaderRepository()
过时的。
|
Modifier and Type | Method and Description |
---|---|
static 类<?> |
loadClass(String className)
过时的。
通过类装载器的列表,并尝试加载所请求的类。
|
static 类<?> |
loadClassWithout(ClassLoader loader, String className)
过时的。
通过类装载器的列表,但排除给定的类装入器,然后尝试加载所请求的类。
|
public static 类<?> loadClass(String className) throws ClassNotFoundException
ClassNotFoundException
。
className
-类的名称来加载。
ClassNotFoundException
-指定类不能被发现。
public static 类<?> loadClassWithout(ClassLoader loader, String className) throws ClassNotFoundException
ClassNotFoundException
。
className
-类的名称来加载。
loader
的类装载器被排除。
ClassNotFoundException
-指定类不能被发现。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.