Lambda Filtering Strategy
Hey Rafael,
I have a use case where I want to intercept some methods (Like Thread.Sleep). But it looks like having the same methods defined in lambdas causes byte buddy to miss them. If I define them outside a lambda then they work flawlessly. My google search stumbled upon the LambdaInstrumentationStrategy.ENABLED which caused JVM failures and I was wondering if there is a way to narrow the scope of lambda instrumentation to my packages?
Thanks for the awesome project and help.
Lambda metafactory is not really possible on modern JVMs anymore. I will likley deprecate the function.
Rather, instrument the classes that contain the lambdas, where the logic will be contained in a private method which you can instrument. You can easily try this with a sample class containing the lambda, to see how this is built up.