groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: Determining the registered DGM classes at runtime
Date Fri, 06 Apr 2018 20:42:53 GMT
ah sorry, I was not explaining right...

I was going to suggest something similar to what you probably already 
have found, which is 
but for some reason I do not understand the constant is protected and 
the type for it is a private static inner class... which means nobody 
can use this really. bummer. So maybe patch that and make it public? See 
GROOVY-8536 for this

In theory you could go through MetaClassImpl, but I think that will a 
lot more than you want.

bye Jochen

On 06.04.2018 21:16, wrote:
> What API can I call to get a list of modules?  I'm having trouble determining the actual
entry point.
> -----Original Message-----
> From: Jochen Theodorou []
> Sent: Friday, April 06, 2018 1:36 PM
> To:
> Subject: Re: Determining the registered DGM classes at runtime
> On 06.04.2018 18:42, wrote:
>> Is it possible to determine the available Category (aka DGM) extension
>> classes at runtime?  I have been relying on
>> DefaultGroovyMethods.DGM_LIKE_CLASSES, but this has been getting
>> reduced with each release due to modularization.  And it was never
>> really a good source to begin with.  I tried looking through
>> ExtensionModuleRegstry, but I couldn't make out a good entry point for
>> asking for the DGM classes.
> you will have to build an index for this I think. You can ask for a list of modules and
also for the available methods in each. Or you simulate the discovery mechanism and play it
from there without instantiating any of the Modules
> bye Jochen

View raw message