本文整理了Java中java.net.URLClassLoader.getClassLoadingLock()
方法的一些代码示例,展示了URLClassLoader.getClassLoadingLock()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。URLClassLoader.getClassLoadingLock()
方法的具体详情如下:
包路径:java.net.URLClassLoader
类名称:URLClassLoader
方法名:getClassLoadingLock
暂无
代码示例来源:origin: org.zaproxy/zap
@Override
protected Object getClassLoadingLock(String className) {
// Allow AddOnClassLoader to use the same locks.
return super.getClassLoadingLock(className);
}
代码示例来源:origin: org.zaproxy/zap
@Override
protected Object getClassLoadingLock(String className) {
if (classLoadingLockProvider != null) {
return classLoadingLockProvider.getLock(className);
}
return super.getClassLoadingLock(className);
}
代码示例来源:origin: org.codehaus.plexus/plexus-classworlds
/**
* Creates a new class realm.
*
* @param world The class world this realm belongs to, must not be <code>null</code>.
* @param id The identifier for this realm, must not be <code>null</code>.
* @param baseClassLoader The base class loader for this realm, may be <code>null</code> to use the bootstrap class
* loader.
*/
public ClassRealm( ClassWorld world, String id, ClassLoader baseClassLoader )
{
super( new URL[0], baseClassLoader );
this.world = world;
this.id = id;
foreignImports = new TreeSet<Entry>();
strategy = StrategyFactory.getStrategy( this );
lockMap = isParallelCapable ? new ConcurrentHashMap<String, Object>() : null;
if ( isParallelCapable ) {
// We must call super.getClassLoadingLock at least once
// to avoid NPE in super.loadClass.
super.getClassLoadingLock(getClass().getName());
}
}
内容来源于网络,如有侵权,请联系作者删除!