本文整理了Java中groovy.lang.GroovyClassLoader.getLoadedClasses()
方法的一些代码示例,展示了GroovyClassLoader.getLoadedClasses()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GroovyClassLoader.getLoadedClasses()
方法的具体详情如下:
包路径:groovy.lang.GroovyClassLoader
类名称:GroovyClassLoader
方法名:getLoadedClasses
[英]Returns all Groovy classes loaded by this class loader.
[中]返回此类装入器装入的所有Groovy类。
代码示例来源:origin: org.codehaus.groovy/groovy
public Class[] getLoadedClasses() {
return delegate.getLoadedClasses();
}
代码示例来源:origin: org.kohsuke.droovy/groovy
public Class[] getLoadedClasses() {
return delegate.getLoadedClasses();
}
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
public Class[] getLoadedClasses() {
return delegate.getLoadedClasses();
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
public Class[] getLoadedClasses() {
return delegate.getLoadedClasses();
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
public Class[] getLoadedClasses() {
return delegate.getLoadedClasses();
}
代码示例来源:origin: jenkinsci/workflow-cps-plugin
private static void cleanUpLoader(ClassLoader loader, Set<ClassLoader> encounteredLoaders, Set<Class<?>> encounteredClasses) throws Exception {
if (loader instanceof CpsGroovyShell.TimingLoader) {
cleanUpLoader(loader.getParent(), encounteredLoaders, encounteredClasses);
return;
}
if (!(loader instanceof GroovyClassLoader)) {
LOGGER.log(Level.FINER, "ignoring {0}", loader);
return;
}
if (!encounteredLoaders.add(loader)) {
return;
}
cleanUpLoader(loader.getParent(), encounteredLoaders, encounteredClasses);
LOGGER.log(Level.FINER, "found {0}", String.valueOf(loader));
SerializableClassRegistry.getInstance().release(loader);
cleanUpGlobalClassValue(loader);
GroovyClassLoader gcl = (GroovyClassLoader) loader;
for (Class<?> clazz : gcl.getLoadedClasses()) {
if (encounteredClasses.add(clazz)) {
LOGGER.log(Level.FINER, "found {0}", clazz.getName());
Introspector.flushFromCaches(clazz);
cleanUpGlobalClassSet(clazz);
cleanUpObjectStreamClassCaches(clazz);
cleanUpLoader(clazz.getClassLoader(), encounteredLoaders, encounteredClasses);
}
}
gcl.clearCache();
}
内容来源于网络,如有侵权,请联系作者删除!