groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C├ędric Champeau <>
Subject Re: Determining the registered DGM classes at runtime
Date Sun, 08 Apr 2018 16:51:21 GMT
2018-04-06 22:42 GMT+02:00 Jochen Theodorou <>:

> ah sorry, I was not explaining right...
> I was going to suggest something similar to what you probably already have
> found, which is StaticTypeCheckingSupport.EXTE
> NSION_METHOD_CACHE.getExtensionMethods(ClassLoader)
> 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
It is private because it was never meant for external consumption. It's
much easier to evolve an API/internals if things are kept private. Look at
the nightmare of people using internal APIs in Gradle and you'll understand
what I mean: the more the API is open, the bigger the surface is, and the
higher the risk to break consumers when you want to change an
implementation detail is.

So we _could_ make this API public, but then it means adding test coverage
and making sure we stabilize the API, if it ever makes sense.

View raw message