Since Java 7, the switch
statement can be used with a String
value but we haven't really embraced that yet, in particular not for our proxy/interceptor implementations which still use if
/else
statements and method.getName().equals
calls. From a readability perspective, it would be nice to refactor towards switch
statements as far as possible.