本文整理了Java中javassist.Loader.delegateLoadingOf()
方法的一些代码示例,展示了Loader.delegateLoadingOf()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Loader.delegateLoadingOf()
方法的具体详情如下:
包路径:javassist.Loader
类名称:Loader
方法名:delegateLoadingOf
[英]Records a class so that the loading of that class is delegated to the parent class loader.
If the given class name ends with .
(dot), then that name is interpreted as a package name. All the classes in that package and the sub packages are delegated.
[中]记录一个类,以便将该类的加载委托给父类加载程序。
如果给定的类名以.
(点)结尾,则该名称将被解释为包名。该包和子包中的所有类都被委派。
代码示例来源:origin: redisson/redisson
private void init(ClassPool cp) {
notDefinedHere = new Hashtable();
notDefinedPackages = new Vector();
source = cp;
translator = null;
domain = null;
delegateLoadingOf("javassist.Loader");
}
代码示例来源:origin: org.javassist/javassist
private void init(ClassPool cp) {
notDefinedHere = new HashMap<String,ClassLoader>();
notDefinedPackages = new Vector<String>();
source = cp;
translator = null;
domain = null;
delegateLoadingOf("javassist.Loader");
}
代码示例来源:origin: org.jboss.javassist/com.springsource.javassist
private void init(ClassPool cp) {
notDefinedHere = new Hashtable();
notDefinedPackages = new Vector();
source = cp;
translator = null;
domain = null;
delegateLoadingOf("javassist.Loader");
}
代码示例来源:origin: org.jboss/javassist
private void init(ClassPool cp) {
notDefinedHere = new Hashtable();
notDefinedPackages = new Vector();
source = cp;
translator = null;
domain = null;
delegateLoadingOf("javassist.Loader");
}
代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all
private void init(ClassPool cp) {
notDefinedHere = new Hashtable();
notDefinedPackages = new Vector();
source = cp;
translator = null;
domain = null;
delegateLoadingOf("javassist.Loader");
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
private void init(ClassPool cp) {
notDefinedHere = new Hashtable();
notDefinedPackages = new Vector();
source = cp;
translator = null;
domain = null;
delegateLoadingOf("javassist.Loader");
}
代码示例来源:origin: hstaudacher/osgi-jax-rs-connector
private void init(ClassPool cp) {
notDefinedHere = new Hashtable();
notDefinedPackages = new Vector();
source = cp;
translator = null;
domain = null;
delegateLoadingOf("javassist.Loader");
}
代码示例来源:origin: ago1024/WurmServerModLauncher
public static void main(String[] args) {
try {
initLogger();
Loader loader = HookManager.getInstance().getLoader();
loader.delegateLoadingOf("javafx.");
loader.delegateLoadingOf("com.sun.");
loader.delegateLoadingOf("org.controlsfx.");
loader.delegateLoadingOf("impl.org.controlsfx");
loader.delegateLoadingOf("com.mysql.");
loader.delegateLoadingOf("org.sqlite.");
loader.delegateLoadingOf("org.gotti.wurmunlimited.modloader.classhooks.");
loader.delegateLoadingOf("javassist.");
Thread.currentThread().setContextClassLoader(loader);
loader.run("org.gotti.wurmunlimited.serverlauncher.DelegatedLauncher", args);
} catch (Throwable e) {
Logger.getLogger(ServerLauncher.class.getName()).log(Level.SEVERE, e.getMessage(), e);
e.printStackTrace();
System.exit(-1);
}
}
代码示例来源:origin: openimaj/openimaj
protected static Loader run(final ClassLoader parent, ClassPool pool, MultiTransformClassFileTransformer tf,
String mainClass, String[] args)
throws Throwable
{
final Loader cl = new Loader(parent, pool);
// Set the correct app name on OSX. Are there similar controls for other
// platforms?
System.setProperty("com.apple.mrj.application.apple.menu.about.name", mainClass);
// skip args4j
cl.delegateLoadingOf("org.apache.log4j.");
cl.addTranslator(pool, tf);
cl.run(mainClass, args);
return cl;
}
代码示例来源:origin: org.openimaj/core-aop-support
protected static Loader run(final ClassLoader parent, ClassPool pool, MultiTransformClassFileTransformer tf,
String mainClass, String[] args)
throws Throwable
{
final Loader cl = new Loader(parent, pool);
// Set the correct app name on OSX. Are there similar controls for other
// platforms?
System.setProperty("com.apple.mrj.application.apple.menu.about.name", mainClass);
// skip args4j
cl.delegateLoadingOf("org.apache.log4j.");
cl.addTranslator(pool, tf);
cl.run(mainClass, args);
return cl;
}
代码示例来源:origin: openimaj/openimaj
/**
* Re-load the given class in a newly created {@link Loader} that is
* configured to apply the given transform(s), and then run the main method.
*
* @param transformer
* the transformer
* @param clz
* the class
* @param args
* the arguments
* @throws Throwable
* if an error occurs
*/
public static void run(MultiTransformClassFileTransformer transformer, Class<?> clz, String[] args) throws Throwable {
final ClassPool pool = new ClassPool();
pool.appendSystemPath();
final Loader loader = new Loader(pool);
// skip args4j
loader.delegateLoadingOf("org.apache.log4j.");
loader.addTranslator(pool, transformer);
loader.run(clz.getName(), args);
}
代码示例来源:origin: org.openimaj/core-aop-support
/**
* Re-load the given class in a newly created {@link Loader} that is
* configured to apply the given transform(s), and then run the main method.
*
* @param transformer
* the transformer
* @param clz
* the class
* @param args
* the arguments
* @throws Throwable
* if an error occurs
*/
public static void run(MultiTransformClassFileTransformer transformer, Class<?> clz, String[] args) throws Throwable {
final ClassPool pool = new ClassPool();
pool.appendSystemPath();
final Loader loader = new Loader(pool);
// skip args4j
loader.delegateLoadingOf("org.apache.log4j.");
loader.addTranslator(pool, transformer);
loader.run(clz.getName(), args);
}
内容来源于网络,如有侵权,请联系作者删除!