Use a getter method to init bean attributes