I want to find anonymous classes in some code to see if they should be changed to lambdas for readability's sake. Is there any tool which does this?



The IntelliJ IDE by JetBrains offers such a feature.

Choose Edit > Find > Search Structurally… > (Gear icon menu) > Existing Templates… > Java > Class-based > anonymous classes

See this Answer on Stack Overflow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.