Coverage Report - org.mule.transport.jdbc.xa.StatementInvocationHandler
 
Classes in this File Line Coverage Branch Coverage Complexity
StatementInvocationHandler
0%
0/6
N/A
2.5
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.transport.jdbc.xa;
 8  
 
 9  
 import java.lang.reflect.InvocationHandler;
 10  
 import java.lang.reflect.InvocationTargetException;
 11  
 import java.lang.reflect.Method;
 12  
 import java.sql.Statement;
 13  
 
 14  
 
 15  
 public class StatementInvocationHandler implements InvocationHandler
 16  
 {
 17  
 
 18  
     private Statement statement;
 19  
 
 20  
     public StatementInvocationHandler(ConnectionWrapper connectionWrapper, Statement statement)
 21  0
     {
 22  0
         this.statement = statement;
 23  0
     }
 24  
 
 25  
     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
 26  
     {
 27  
         try
 28  
         {
 29  0
             return method.invoke(statement, args);
 30  
         }
 31  0
         catch (InvocationTargetException ex)
 32  
         {
 33  0
             throw ex.getCause();
 34  
         }
 35  
     }
 36  
 
 37  
 }