When working with variables/parameters that can only take a finite number of values, I try to always use Java\'s enum, as in
enum
public enum BonusT
You could perhaps use something like
interface EnumWithId { public int getId(); } enum Foo implements EnumWithId { ... }
That would reduce the need for reflection in your utility class.