You can turn a properties file into an enum with generated code. You can do this staticly before the program is compiled and optionally at runtime by using the Compiler API. Doing this adds a a lot of complexity and usually its simpler to use a Map as has been suggested.