Mam klasy mapujące np.
class MyMapper {
Map<String, Priority> map = new HashMap<>();
public MyMapper() {
this.map.put("Very Important", Priority.BLOCKER);
this.map.put("Important", Priority.CRITICAL);
this.map.put("Average", Priority.MAJOR);
this.map.put("Not Important", Priority.MINOR);
this.map.put("To ignore", Priority.TRIVIAL);
}
@Override public Priority toPriority ( Msg msg ) {
return map.get(msg.getPriority());
}
}
Jak wyrzucić to na zewnątrz jarów do plików konfiguracyjnych tak żeby było modnie?
XMLe? XML Beans?