AnnotationInvocationHandler: avoid calling Method#getName too often

This is only a cosmetic change, but we should not call getName()
over and over again ;-)

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2013-11-08 14:46:09 -06:00
parent db0422dcde
commit ff323d46a3

View File

@ -21,8 +21,9 @@ public class AnnotationInvocationHandler implements InvocationHandler {
} }
public Object invoke(Object proxy, Method method, Object[] arguments) { public Object invoke(Object proxy, Method method, Object[] arguments) {
String name = method.getName();
for (int i = 2; i < data.length; i += 2) { for (int i = 2; i < data.length; i += 2) {
if (method.getName().equals(data[i])) { if (name.equals(data[i])) {
return data[i + 1]; return data[i + 1];
} }
} }