gboat2.base.dao.util
类 GBoatDaoClassLoader

java.lang.Object
  继承者 java.lang.ClassLoader
      继承者 org.springframework.osgi.util.BundleDelegatingClassLoader
          继承者 gboat2.base.dao.util.GBoatDaoClassLoader

public class GBoatDaoClassLoader
extends org.springframework.osgi.util.BundleDelegatingClassLoader

DAO bundle 内部使用的 class loader ,该 class loader只允许使用 createBundleClassLoaderFor(Bundle)createBundleClassLoaderFor(Bundle, ClassLoader) 创建一次, 创建后使用getInstance()来使用它,使用之前必须先创建

从以下版本开始:
1.0
作者:
lysming

构造方法摘要
protected GBoatDaoClassLoader(org.osgi.framework.Bundle bundle, ClassLoader bridgeLoader)
           
 
方法摘要
 void add(String className, org.osgi.framework.Bundle bundle)
           
static GBoatDaoClassLoader createBundleClassLoaderFor(org.osgi.framework.Bundle aBundle)
          Factory method for creating a class loader over the given bundle.
static GBoatDaoClassLoader createBundleClassLoaderFor(org.osgi.framework.Bundle bundle, ClassLoader bridge)
          Factory method for creating a class loader over the given bundle and with a given class loader as fall-back.
 boolean equals()
           
protected  Class<?> findClass(String name)
           
static GBoatDaoClassLoader getInstance()
           
 void remove(String className)
           
 
从类 org.springframework.osgi.util.BundleDelegatingClassLoader 继承的方法
findResource, findResources, getBundle, getResource, loadClass, toString
 
从类 java.lang.ClassLoader 继承的方法
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

GBoatDaoClassLoader

protected GBoatDaoClassLoader(org.osgi.framework.Bundle bundle,
                              ClassLoader bridgeLoader)
方法详细信息

getInstance

public static GBoatDaoClassLoader getInstance()

add

public void add(String className,
                org.osgi.framework.Bundle bundle)

remove

public void remove(String className)

createBundleClassLoaderFor

public static GBoatDaoClassLoader createBundleClassLoaderFor(org.osgi.framework.Bundle aBundle)
Factory method for creating a class loader over the given bundle.

参数:
aBundle - bundle to use for class loading and resource acquisition
返回:
class loader adapter over the given bundle

createBundleClassLoaderFor

public static GBoatDaoClassLoader createBundleClassLoaderFor(org.osgi.framework.Bundle bundle,
                                                             ClassLoader bridge)
Factory method for creating a class loader over the given bundle and with a given class loader as fall-back. In case the bundle cannot find a class or locate a resource, the given class loader will be used as fall back. the class loader can only be created once,after created use getInstance() to get it.

参数:
bundle - bundle used for class loading and resource acquisition
bridge - class loader used as fall back in case the bundle cannot load a class or find a resource. Can be null
返回:
class loader adapter over the given bundle and class loader

findClass

protected Class<?> findClass(String name)
                      throws ClassNotFoundException
覆盖:
org.springframework.osgi.util.BundleDelegatingClassLoader 中的 findClass
抛出:
ClassNotFoundException

equals

public boolean equals()


Copyright © 2014 广联达软件股份有限公司(Glodon Software Co., Ltd.). All rights reserved.