I think this should be done in the constructor of this class. The setBaseName() relies on the serviceNameBase which is a final field and so all of the computation that's done in setBaseName() can really be done in the constructor. That would effectively mean that the baseName can be made a final field too.