public Object extractEntity(ClientContext context, Object... args) { Class<?>[] intfs = {returnType}; ClientResponseProxy clientProxy = new ClientResponseProxy(context, methodHandlers, returnType); return Proxy.newProxyInstance(returnType.getClassLoader(), intfs, clientProxy); }
public Object invoke(Object o, Method method, Object[] args) throws Throwable { // equals and hashCode were added for cases where the proxy is added to // collections. The Spring transaction management, for example, adds // transactional Resources to a Collection, and it calls equals and // hashCode. if (method.getName().equals("equals")) { return this.equals(o); } else if (method.getName().equals("hashCode")) { return this.hashCode(); } EntityExtractor entityExtractor = methodMap.get(method); if (entityExtractor == null) throw new RuntimeException(Messages.MESSAGES.couldNotProcessMethod(method)); return entityExtractor.extractEntity(context, entityExtractor, args); }
public Object invoke(Object o, Method method, Object[] args) throws Throwable { // equals and hashCode were added for cases where the proxy is added to // collections. The Spring transaction management, for example, adds // transactional Resources to a Collection, and it calls equals and // hashCode. if (method.getName().equals("equals")) { return this.equals(o); } else if (method.getName().equals("hashCode")) { return this.hashCode(); } EntityExtractor entityExtractor = methodMap.get(method); if (entityExtractor == null) throw new RuntimeException(Messages.MESSAGES.couldNotProcessMethod(method)); return entityExtractor.extractEntity(context, entityExtractor, args); }
public Object extractEntity(ClientContext context, Object... args) { Class<?>[] intfs = {returnType}; ClientResponseProxy clientProxy = new ClientResponseProxy(context, methodHandlers, returnType); return Proxy.newProxyInstance(returnType.getClassLoader(), intfs, clientProxy); }
public Object invoke(Object o, Method method, Object[] args) throws Throwable { // equals and hashCode were added for cases where the proxy is added to // collections. The Spring transaction management, for example, adds // transactional Resources to a Collection, and it calls equals and // hashCode. if (method.getName().equals("equals")) { return this.equals(o); } else if (method.getName().equals("hashCode")) { return this.hashCode(); } EntityExtractor entityExtractor = methodMap.get(method); if (entityExtractor == null) throw new RuntimeException(Messages.MESSAGES.couldNotProcessMethod(method)); return entityExtractor.extractEntity(context, entityExtractor, args); }
public Object extractEntity(ClientContext context, Object... args) { Class<?>[] intfs = {returnType}; ClientResponseProxy clientProxy = new ClientResponseProxy(context, methodHandlers, returnType); return Proxy.newProxyInstance(returnType.getClassLoader(), intfs, clientProxy); }