-
-
Notifications
You must be signed in to change notification settings - Fork 846
Description
Hello; thanks for a great product. I know from personal experience how hard it is to run an open source project and this one is just fantastic. Thanks for all the time you put into it.
I had a request for what I hope is a small feature. Currently, there is a nice little feature of MethodCall where you can specify that it should be supplied with existing object references. I confess that this works like magic for me (I haven't dug into the code to see how it is accomplished, and I'm not sure how it differs from the with(Object...) call…)!
The references, it turns out, are stored in static fields inside the generated class (I was surprised to note these fields are not final…). That of course makes sense.
The fields used to store these references are named something like this: methodCall$4BJ1aAKz. I think that the name is generated via a constant prefix and RandomString#make().
While I can see that I could probably somehow supply my own ArgumentLoader machinery to customize this, it would be nice if there were an easy way in the API/DSL to specify how these reference-storing static fields should be named and decorated.