I know there is a term for this, but it escapes me at the moment. Basically, i have something like this:
private static final Map<String, String> myMap = new HashMap<Integer, String>();
static {
myMap.put("one", "one text");
myMap.put("two", "two text");
}
instead of accessing the map with the standard
myMap.get("one");
is there any way I can use reflection or something else so i can access the string like this
myMap.one;
I know its possible in other languages, not sure if anyone figured out how to do with in java yet. The way the current system is designed, interfaces are really impractical and would end up being even more of a mess than what im dealing with right now. Its not a big deal, but it would simplify synchronizing keys across multiple classes and systems.
thanks