We have an old service loader, which would be used as MyService.get().doSomething(). As we clean up code and move to autowiring, it's a 2 step process:
1. refactor: extract field, so that now i have private final MyService myService = MyService.get(); and myService.doSomething() in code
2. find/replace with regex:
find: private final (\w+ \w+) = \w+\.get\(\);
replace: @Autowired private $1;
It'd be great if I could customize the format of the extract field refactor so I don't need to do the 2nd step, which is extra annoying since I can't have find/replace presets, so I keep the patterns in a separate text file...