private void stripProxy(JsonBuilder proxy) throws Throwable { Class<?> type = proxy.getClass().getInterfaces()[0]; HashSet<String> validAttrs = getAttributeNames(type.getMethods()); Hashtable<String, Method> ispropertyGetters = getJsonBuilders(type.getMethods()); for (String key : jsonObject.keys()) { String name = methodName2AttrName(key); if (!validAttrs.contains(name)) { jsonObject.remove(key); continue; } Method ispropertyGetter = ispropertyGetters.get(name); if (ispropertyGetter != null) { ((IsProperties) invoke(proxy, ispropertyGetter, new Object[] {})).strip(); } } }