I'm receiving a certain string value over the network and I need to call a function based on that value.
So this is more or less what I have at the moment:
String methodName = soapObj.getMethodName();
switch(methodName) {
case "getTemperature":
getDeviceTemp();
break;
case "getBrightness":
getScreenBrightness();
break;
...
}
And.. there are about 60 to 70 methods supported like that.
What's the most elegant way of handling above situation without using reflection? (The app is moderately constrained performance-wise).