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;
16 public class JDBCProxy implements InvocationHandler {
17 private static final Logger LOG = LoggerFactory.getLogger(JDBCProxy.class);
18 private Object myObject = null;
19 private Class<?> myObjectClass = null;
21 public JDBCProxy(Object obj) {
23 this.myObjectClass = this.myObject.getClass();
27 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
28 LOG.debug("Class {} Method {}", this.myObjectClass.getSimpleName(), method.getName());
29 return method.invoke(this.myObject, args);