groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject get bytecode from groovyclassloader?
Date Sun, 28 Oct 2018 17:58:01 GMT
Hi guys,

wonder if it would make sense to store the bytecode of the compiled scripts
in the groovyclassloader to be able to access it as any other classloader
(jar/file) using loader.getResource("class/path/with/full/Name.class")?

I know it can be done with a BytecodeProcessor but it is not that
convenient and the impl can be trivial
since groovy.lang.GroovyClassLoader.ClassCollector#createClass can also
populate some resource map as well. Don't think the subfolder emulation is
needed (ie getResource("class/path") can return null if the package does
not exist anywhere else).

wdyt?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>

Mime
View raw message