GROOVY-5249 ClassInfo refactoring: extract method