reflection does come at a cost though (slight performance hit and it's often harder to trace), so I'd personally go with the 'static' hashmap... but wouldn't object if you went ahead and implemented it with reflection ;)