本文整理了Java中org.eclipse.jetty.util.Loader.loadClass()
方法的一些代码示例,展示了Loader.loadClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Loader.loadClass()
方法的具体详情如下:
包路径:org.eclipse.jetty.util.Loader
类名称:Loader
方法名:loadClass
[英]Load a class. Load a class from the same classloader as the passed loadClass
, or if none then use #loadClass(String)
[中]加载一个类。从与传递的loadClass
相同的类加载器加载类,如果没有,则使用#loadClass(String)
代码示例来源:origin: org.eclipse.jetty/jetty-webapp
protected void loadConfigurations()
throws Exception
{
//if the configuration instances have been set explicitly, use them
if (_configurations.size()>0)
return;
if (_configurationClasses.size()==0) {
_configurationClasses.addAll(Configuration.ClassList.serverDefault(getServer()));
}
for (String configClass : _configurationClasses)
_configurations.add((Configuration)Loader.loadClass(configClass).getDeclaredConstructor().newInstance());
}
代码示例来源:origin: org.eclipse.jetty/jetty-webapp
private void loadClass ()
{
if (_clazz != null)
return;
if (_className == null)
return;
try
{
_clazz = Loader.loadClass(_className);
}
catch (Exception e)
{
LOG.warn(e);
}
}
}
代码示例来源:origin: org.eclipse.jetty/jetty-webapp
Loader.loadClass(servlet_class);
代码示例来源:origin: org.eclipse.jetty/jetty-util
/** Load a class.
* Load a class from the same classloader as the passed <code>loadClass</code>, or if none
* then use {@link #loadClass(String)}
*
* @param loaderClass a similar class, belong in the same classloader of the desired class to load
* @param name the name of the new class to load
* @return Class
* @throws ClassNotFoundException if not able to find the class
*/
@SuppressWarnings("rawtypes")
public static Class loadClass(Class loaderClass, String name)
throws ClassNotFoundException
{
if (loaderClass!=null && loaderClass.getClassLoader()!=null)
return loaderClass.getClassLoader().loadClass(name);
return loadClass(name);
}
代码示例来源:origin: org.eclipse.jetty/jetty-util
Class<?> log_class = __logClass==null?null:Loader.loadClass(Log.class,__logClass);
if (LOG == null || (log_class!=null && !LOG.getClass().equals(log_class)))
代码示例来源:origin: org.eclipse.jetty/jetty-security
+ _userRoleTableRoleKey;
Loader.loadClass(_jdbcDriver).getDeclaredConstructor().newInstance();
super.doStart();
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
@SuppressWarnings("rawtypes")
public static Class loadClass(Class loadClass,String name)
throws ClassNotFoundException
{
return loadClass(loadClass,name,false);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
@SuppressWarnings("rawtypes")
public static Class loadClass(Class loadClass,String name)
throws ClassNotFoundException
{
return loadClass(loadClass,name,false);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
@SuppressWarnings("rawtypes")
public static Class loadClass(Class loadClass,String name)
throws ClassNotFoundException
{
return loadClass(loadClass,name,false);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@SuppressWarnings("rawtypes")
public static Class loadClass(Class loadClass,String name)
throws ClassNotFoundException
{
return loadClass(loadClass,name,false);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@SuppressWarnings("rawtypes")
public static Class loadClass(Class loadClass,String name)
throws ClassNotFoundException
{
return loadClass(loadClass,name,false);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
@SuppressWarnings("rawtypes")
public static Class loadClass(Class loadClass,String name)
throws ClassNotFoundException
{
return loadClass(loadClass,name,false);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
public synchronized Class<?> loadClass(String className) throws ClassNotFoundException
{
if (className == null)
return null;
if (_classLoader == null)
return Loader.loadClass(this.getClass(),className);
return _classLoader.loadClass(className);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
public synchronized Class<?> loadClass(String className) throws ClassNotFoundException
{
if (className == null)
return null;
if (_classLoader == null)
return Loader.loadClass(this.getClass(),className);
return _classLoader.loadClass(className);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
public synchronized Class<?> loadClass(String className) throws ClassNotFoundException
{
if (className == null)
return null;
if (_classLoader == null)
return Loader.loadClass(this.getClass(),className);
return _classLoader.loadClass(className);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public synchronized Class<?> loadClass(String className) throws ClassNotFoundException
{
if (className == null)
return null;
if (_classLoader == null)
return Loader.loadClass(this.getClass(),className);
return _classLoader.loadClass(className);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
public synchronized Class<?> loadClass(String className) throws ClassNotFoundException
{
if (className == null)
return null;
if (_classLoader == null)
return Loader.loadClass(this.getClass(),className);
return _classLoader.loadClass(className);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
public synchronized Class<?> loadClass(String className) throws ClassNotFoundException
{
if (className == null)
return null;
if (_classLoader == null)
return Loader.loadClass(this.getClass(),className);
return _classLoader.loadClass(className);
}
代码示例来源:origin: stackoverflow.com
import javassist.*;
import test.Rectangle;
public class Main {
public static void main(String[] args) throws Throwable {
ClassPool pool = ClassPool.getDefault();
Loader cl = new Loader(pool);
CtClass ct = pool.get("test.Rectangle");
ct.setSuperclass(pool.get("test.Point"));
Class c = cl.loadClass("test.Rectangle");
Object rect = c.newInstance();
}
}
代码示例来源:origin: jenkinsci/winstone
private static Class<?> nodeClass(XmlParser.Node node) throws ClassNotFoundException
{
String className = node.getAttribute("class");
if (className == null)
return null;
return Loader.loadClass(className);
}
内容来源于网络,如有侵权,请联系作者删除!