本文整理了Java中com.sun.tools.xjc.Options.getUserClassLoader()
方法的一些代码示例,展示了Options.getUserClassLoader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.getUserClassLoader()
方法的具体详情如下:
包路径:com.sun.tools.xjc.Options
类名称:Options
方法名:getUserClassLoader
[英]Gets a classLoader that can load classes specified via the -classpath option.
[中]获取一个类加载器,该类加载器可以加载通过-classpath选项指定的类。
代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc
/**
* Gets all the {@link Plugin}s discovered so far.
*
* <p>
* A plugins are enumerated when this method is called for the first time,
* by taking {@link #classpaths} into account. That means
* "-cp plugin.jar" has to come before you specify options to enable it.
*/
public List<Plugin> getAllPlugins() {
if(allPlugins==null) {
allPlugins = new ArrayList<Plugin>();
ClassLoader ucl = getUserClassLoader(getClass().getClassLoader());
for( Plugin aug : findServices(Plugin.class,ucl) )
allPlugins.add(aug);
}
return allPlugins;
}
代码示例来源:origin: sun-jaxb/jaxb-xjc
/**
* Gets all the {@link Plugin}s discovered so far.
*
* <p>
* A plugins are enumerated when this method is called for the first time,
* by taking {@link #classpaths} into account. That means
* "-cp plugin.jar" has to come before you specify options to enable it.
*/
public List<Plugin> getAllPlugins() {
if(allPlugins==null) {
allPlugins = new ArrayList<Plugin>();
ClassLoader ucl = getUserClassLoader(getClass().getClassLoader());
for( Plugin aug : findServices(Plugin.class,ucl) )
allPlugins.add(aug);
}
return allPlugins;
}
内容来源于网络,如有侵权,请联系作者删除!