extract method for finding constant name from role