Anonymous inner classes to named inner classes