Clover coverage report - Maven Clover report
Coverage timestamp: Sun Jun 1 2008 19:59:48 EST
file stats: LOC: 50   Methods: 2
NCLOC: 26   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
AbstractMsgMethodDispatcher.java 0% 0% 0% 0%
coverage
 1    /**
 2    * Copyright 2006 The Apache Software Foundation
 3    *
 4    * Licensed under the Apache License, Version 2.0 (the "License");
 5    * you may not use this file except in compliance with the License.
 6    * You may obtain a copy of the License at
 7    *
 8    * http://www.apache.org/licenses/LICENSE-2.0
 9    *
 10    * Unless required by applicable law or agreed to in writing, software
 11    * distributed under the License is distributed on an "AS IS" BASIS,
 12    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13    * See the License for the specific language governing permissions and
 14    * limitations under the License.
 15    */
 16    package org.codehaus.wadi.group.impl;
 17   
 18    import java.lang.reflect.InvocationTargetException;
 19    import java.lang.reflect.Method;
 20    import org.codehaus.wadi.group.Dispatcher;
 21   
 22    /**
 23    *
 24    * @version $Revision: 1603 $
 25    */
 26    abstract class AbstractMsgMethodDispatcher extends AbstractMsgDispatcher {
 27    protected final Object _target;
 28    protected final Method _method;
 29   
 30  0 public AbstractMsgMethodDispatcher(Dispatcher dispatcher, Object target, Method method, Class type) {
 31  0 super(dispatcher, type);
 32  0 _target = target;
 33  0 _method = method;
 34    }
 35   
 36  0 protected Object invoke(Object[] args) throws Exception {
 37  0 try {
 38  0 return _method.invoke(_target, args);
 39    } catch (InvocationTargetException e) {
 40  0 Throwable cause = e.getCause();
 41  0 if (cause instanceof Runnable) {
 42  0 throw (RuntimeException) cause;
 43  0 } else if (cause instanceof Exception) {
 44  0 throw (Exception) cause;
 45    } else {
 46  0 throw e;
 47    }
 48    }
 49    }
 50    }