ch.qos.logback.core.util.Loader.getClassLoaderOfObject()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(7.1k)|赞(0)|评价(0)|浏览(156)

本文整理了Java中ch.qos.logback.core.util.Loader.getClassLoaderOfObject()方法的一些代码示例,展示了Loader.getClassLoaderOfObject()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Loader.getClassLoaderOfObject()方法的具体详情如下:
包路径:ch.qos.logback.core.util.Loader
类名称:Loader
方法名:getClassLoaderOfObject

Loader.getClassLoaderOfObject介绍

[英]Get the class loader of the object passed as argument. Return the system class loader if appropriate.
[中]获取作为参数传递的对象的类装入器。如果合适,返回系统类加载器。

代码示例

代码示例来源:origin: ch.qos.logback/logback-classic

public URL findURLOfDefaultConfigurationFile(boolean updateStatus) {
  ClassLoader myClassLoader = Loader.getClassLoaderOfObject(this);
  URL url = findConfigFileURLFromSystemProperties(myClassLoader, updateStatus);
  if (url != null) {
    return url;
  }
  url = getResource(TEST_AUTOCONFIG_FILE, myClassLoader, updateStatus);
  if (url != null) {
    return url;
  }
  url = getResource(GROOVY_AUTOCONFIG_FILE, myClassLoader, updateStatus);
  if (url != null) {
    return url;
  }
  return getResource(AUTOCONFIG_FILE, myClassLoader, updateStatus);
}

代码示例来源:origin: camunda/camunda-bpm-platform

public static Class<?> loadClass(String clazz, Context context)
    throws ClassNotFoundException {
 ClassLoader cl = getClassLoaderOfObject(context);
 return cl.loadClass(clazz);
}

代码示例来源:origin: camunda/camunda-bpm-platform

public static Object instantiateByClassNameAndParameter(String className,
                            Class<?> superClass, Context context, Class<?> type, Object param) throws IncompatibleClassException,
    DynamicClassLoadingException {
 ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
 return instantiateByClassNameAndParameter(className, superClass, classLoader, type, param);
}

代码示例来源:origin: camunda/camunda-bpm-platform

public static Object instantiateByClassName(String className,
                      Class<?> superClass, Context context) throws IncompatibleClassException,
    DynamicClassLoadingException {
 ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
 return instantiateByClassName(className, superClass, classLoader);
}

代码示例来源:origin: camunda/camunda-bpm-platform

public URL findURLOfDefaultConfigurationFile(boolean updateStatus) {
 ClassLoader myClassLoader = Loader.getClassLoaderOfObject(this);
 URL url = findConfigFileURLFromSystemProperties(myClassLoader, updateStatus);
 if (url != null) {
  return url;
 }
 url = getResource(GROOVY_AUTOCONFIG_FILE, myClassLoader, updateStatus);
 if (url != null) {
  return url;
 }
 url = getResource(TEST_AUTOCONFIG_FILE, myClassLoader, updateStatus);
 if (url != null) {
  return url;
 }
 return getResource(AUTOCONFIG_FILE, myClassLoader, updateStatus);
}

代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand

public static Class loadClass(String clazz, Context context)
  throws ClassNotFoundException {
 ClassLoader cl = getClassLoaderOfObject(context);
 return cl.loadClass(clazz);
}

代码示例来源:origin: tony19/logback-android

/**
 *
 * @param clazz the name of the class to find
 * @param context the logging context
 * @return the class
 * @throws ClassNotFoundException if class not found
 */
public static Class<?> loadClass(String clazz, Context context)
    throws ClassNotFoundException {
 ClassLoader cl = getClassLoaderOfObject(context);
 return cl.loadClass(clazz);
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core

public static Class loadClass(String clazz, Context context)
    throws ClassNotFoundException {
 ClassLoader cl = getClassLoaderOfObject(context);
 return cl.loadClass(clazz);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

public static Class<?> loadClass(String clazz, Context context) throws ClassNotFoundException {
  ClassLoader cl = getClassLoaderOfObject(context);
  return cl.loadClass(clazz);
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

public static Class<?> loadClass(String clazz, Context context) throws ClassNotFoundException {
  ClassLoader cl = getClassLoaderOfObject(context);
  return cl.loadClass(clazz);
}

代码示例来源:origin: ch.qos.logback/core

public static Class loadClass(String clazz, Context context)
    throws ClassNotFoundException {
 ClassLoader cl = getClassLoaderOfObject(context);
 return cl.loadClass(clazz);
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

public static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, Context context, Class<?> type, Object param)
        throws IncompatibleClassException, DynamicClassLoadingException {
  ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
  return instantiateByClassNameAndParameter(className, superClass, classLoader, type, param);
}

代码示例来源:origin: tony19/logback-android

public static Object instantiateByClassName(String className,
                      Class<?> superClass, Context context) throws IncompatibleClassException,
    DynamicClassLoadingException {
 ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
 return instantiateByClassName(className, superClass, classLoader);
}

代码示例来源:origin: tony19/logback-android

public static Object instantiateByClassNameAndParameter(String className,
                            Class<?> superClass, Context context, Class<?> type, Object param) throws IncompatibleClassException,
    DynamicClassLoadingException {
 ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
 return instantiateByClassNameAndParameter(className, superClass, classLoader, type, param);
}

代码示例来源:origin: com.hynnet/logback-core

public static Object instantiateByClassName(String className,
                      Class<?> superClass, Context context) throws IncompatibleClassException,
    DynamicClassLoadingException {
 ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
 return instantiateByClassName(className, superClass, classLoader);
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

public static Object instantiateByClassNameAndParameter(String className, Class<?> superClass, Context context, Class<?> type, Object param)
        throws IncompatibleClassException, DynamicClassLoadingException {
  ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
  return instantiateByClassNameAndParameter(className, superClass, classLoader, type, param);
}

代码示例来源:origin: com.hynnet/logback-core

public static Object instantiateByClassNameAndParameter(String className,
                            Class<?> superClass, Context context, Class<?> type, Object param) throws IncompatibleClassException,
    DynamicClassLoadingException {
 ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
 return instantiateByClassNameAndParameter(className, superClass, classLoader, type, param);
}

代码示例来源:origin: ch.qos.logback/core

public static Object instantiateByClassName(String className,
                      Class superClass, Context context) throws IncompatibleClassException,
    DynamicClassLoadingException {
 ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
 return instantiateByClassName(className, superClass, classLoader);
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/ch.qos.logback.core

public static Object instantiateByClassNameAndParameter(String className,
                            Class superClass, Context context, Class type, Object param) throws IncompatibleClassException,
    DynamicClassLoadingException {
 ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
 return instantiateByClassNameAndParameter(className, superClass, classLoader, type, param);
}

代码示例来源:origin: com.alibaba.citrus.tool/antx-autoexpand

public static Object instantiateByClassName(String className,
  Class superClass, Context context) throws IncompatibleClassException,
  DynamicClassLoadingException {
 ClassLoader classLoader = Loader.getClassLoaderOfObject(context);
 return instantiateByClassName(className, superClass, classLoader);
}

相关文章