2 * Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.md.sal.dom.xsql.jdbc;
11 import java.lang.reflect.InvocationHandler;
12 import java.lang.reflect.Method;
13 import org.slf4j.Logger;
14 import org.slf4j.LoggerFactory;
17 * To be removed in Nitrogen
20 public class JDBCProxy implements InvocationHandler {
21 private static final Logger LOG = LoggerFactory.getLogger(JDBCProxy.class);
22 private Object myObject = null;
23 private Class<?> myObjectClass = null;
25 public JDBCProxy(Object obj) {
27 this.myObjectClass = this.myObject.getClass();
31 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
32 LOG.debug("Class {} Method {}", this.myObjectClass.getSimpleName(), method.getName());
33 return method.invoke(this.myObject, args);