本文整理了Java中java.lang.ClassLoader.findSystemClass()
方法的一些代码示例,展示了ClassLoader.findSystemClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ClassLoader.findSystemClass()
方法的具体详情如下:
包路径:java.lang.ClassLoader
类名称:ClassLoader
方法名:findSystemClass
[英]Finds the class with the specified name, loading it using the system class loader if necessary.
[中]查找具有指定名称的类,必要时使用系统类加载器加载该类。
代码示例来源:origin: net.sf.jt400/jt400
protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException
{
return findSystemClass(name);
}
代码示例来源:origin: org.ghost4j/ghost4j
public Class loadClass(String name) throws ClassNotFoundException {
try { return super.findSystemClass(name); }
catch(ClassNotFoundException x) {
try {
String url = path + name.replace('.', '/') + ".class";
InputStream is = new URL(url).openConnection().getInputStream();
byte bytes[] = new byte[is.available()];
is.read(bytes);
is.close();
Class result = defineClass(name, bytes, 0, bytes.length);
resolveClass(result);
return result;
} catch(IOException y) { return null; }
}
}
}
代码示例来源:origin: org.jboss.jbossas/jboss-as-server
public synchronized Class loadClass(String name, boolean resolve)
throws ClassNotFoundException
{
// isn't this redundant?
if (name.endsWith("$Proxy") && name.equals(compiler.getProxyClassName()))
{
return compiler.proxyType;
}
// delegate to the original class loader
ClassLoader cl = getTargetClassLoader();
if (cl == null)
{
return super.findSystemClass(name);
}
return cl.loadClass(name);
}
代码示例来源:origin: org.activecomponents.jadex/jadex-commons
ret = super.findSystemClass(classname);
内容来源于网络,如有侵权,请联系作者删除!