sO handleObjectMethodsInProxyInvocationHandler( Method implementedMethod, Method method, O proxy, O[] actualArgs) { S name = method.getName(); if (name.equals("hashCode")) ret hashCode(); if (name.equals("equals")) ret proxy == actualArgs[0]; if (name.equals("toString")) ret toString(); fail("No handler for method " + method + " (only have " + implementedMethod + ")"); }