Clover coverage report - Cactus 1.4 for J2EE API 13
Coverage timestamp: Sun Aug 25 2002 18:02:10 BST
file stats: LOC: 78   Methods: 4
NCLOC: 45   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ServletContextWrapper.java 0% 0% 0% 0%
 1   
 /*   Generated by AspectJ version 1.0.5 */
 2   
 package org.apache.cactus.server;
 3   
 import java.lang.reflect.Method;
 4   
 import java.util.Set;
 5   
 import javax.servlet.ServletContext;
 6   
 
 7   
 /** 
 8   
  * Wrapper around Servlet 2.3 <code>ServletContext</code>. This wrapper 
 9   
  * provides additional behaviour (see 
 10   
  * <code>AbstractServletContextWrapper</code>). 
 11   
  * 
 12   
  * @author <a href="mailto:vmassol@apache.org">Vincent Massol</a> 
 13   
  * 
 14   
  * @version $Id: ServletContextWrapper.java,v 1.3 2002/07/21 12:09:16 vmassol Exp $ 
 15   
  * @see RequestDispatcherWrapper 
 16   
  */
 17   
 public class ServletContextWrapper extends AbstractServletContextWrapper {
 18   
   /** 
 19   
        * @param theOriginalContext the original servlet context object 
 20   
        */
 21  0
   public ServletContextWrapper(ServletContext theOriginalContext) {
 22  0
     super(theOriginalContext);
 23   
     ;
 24   
   } 
 25   
   /** 
 26   
        * @see ServletContext#getServletContextName() 
 27   
        */
 28  0
   public String getServletContextName() {
 29  0
     return this.originalContext.getServletContextName();
 30   
   } 
 31   
 
 32   
   /** 
 33   
        * @see #getResourcePaths(String) 
 34   
        */
 35  0
   public Set getResourcePaths() {
 36  0
     Set returnSet;
 37  0
     try {
 38  0
       Method method = this.originalContext.getClass().getMethod("getResourcePaths", null);
 39  0
       if (method != null) {
 40  0
         returnSet = (Set)method.invoke(this.originalContext, null);
 41   
       } else {
 42  0
         throw new RuntimeException(
 43   
             "Method ServletContext.getResourcePaths() no longer supported by your servlet engine !");
 44   
       } 
 45   
     } catch (Exception e) {
 46  0
       e.printStackTrace();
 47  0
       throw new RuntimeException("Error getting/calling method getResourcePaths()");
 48   
     } 
 49  0
     return returnSet;
 50   
   } 
 51   
 
 52   
   /** 
 53   
        * Added to support the changes of the Jakarta Servlet API 2.3 of the 
 54   
        * 17/03/2001 (in anticipation of the upcoming draft of Servlet 2.3). Kept 
 55   
        * the method without parameters for servlet engines that do not have 
 56   
        * upgraded yet to the new signature. 
 57   
        * 
 58   
        * @see ServletContext#getResourcePaths(String 
 59   
        */
 60  0
   public Set getResourcePaths(String thePath) {
 61  0
     Set returnSet;
 62  0
     try {
 63  0
       Method method = this.originalContext.getClass().getMethod("getResourcePaths", 
 64   
           new java.lang.Class[] {String.class});
 65  0
       if (method != null) {
 66  0
         returnSet = (Set)method.invoke(this.originalContext, new java.lang.Object[] {thePath});
 67   
       } else {
 68  0
         throw new RuntimeException(
 69   
             "Method ServletContext.getResourcePaths(String path) not supported yet by your servlet engine !");
 70   
       } 
 71   
     } catch (Exception e) {
 72  0
       e.printStackTrace();
 73  0
       throw new RuntimeException("Error getting/calling method getResourcePaths(String path)");
 74   
     } 
 75  0
     return returnSet;
 76   
   } 
 77   
 
 78   
 }