Not sure about the reason to extract out the class name as a method and not use it inline. But In case the reason is that it is used at multiple places, you can continue using it inline as it is more readable.