Re: About simplifying the switch for runtime groovydoc

2018-10-28 Thread Guillaume Laforge
Since it's for Groovy 3.0, and @GroovyDoc hasn't yet been available in an officially released version, it's still possible to change the syntax at this time without any harm. On Sun, Oct 28, 2018 at 7:40 AM Remko Popma wrote: > > > > On Oct 25, 2018, at 21:48, Keith Suderman wrote: > > > > On

Re: About simplifying the switch for runtime groovydoc

2018-10-28 Thread Daniel.Sun
Hi Guillaume, > it's still possible to change the syntax at this time without any harm. Here is the PR to complete the change: https://github.com/apache/groovy/pull/817 Cheers, Daniel.Sun - Daniel Sun Apache Groovy committer Blog: http://blog.sunlan.me Twitter: @daniel_sun -- Sent

Re: About simplifying the switch for runtime groovydoc

2018-10-28 Thread Remko Popma
Daniel, Question: how do I consume the groovydoc string at runtime in the application? For example, I would like to do something like this: —— /**@ * Encrypts a file. */ class Encrypt { static void main(String... args) { def cli = new CliBuilder() def descr = // how to get

Re: About simplifying the switch for runtime groovydoc

2018-10-28 Thread Daniel.Sun
Hi Remko, You can get the runtime groovydoc with reflection, here is an example: AA.class.getMethod('m', new Class[0]).groovydoc.content.contains('method m') BTW, I think we can add a DGM to simplify the above code ;-) The complete example van be found at: https://github.com/apache/groovy/blob/

get bytecode from groovyclassloader?

2018-10-28 Thread Romain Manni-Bucau
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