Clover coverage report - DNA - 1.0
Coverage timestamp: Sun Oct 12 2003 11:23:26 BST
file stats: LOC: 51   Methods: 1
NCLOC: 15   Classes: 2
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
ReleaseUtil.java 100% 100% 100% 100%
coverage
 1   
 /*
 2   
  * Copyright (C) The JContainer Group. All rights reserved.
 3   
  *
 4   
  * This software is published under the terms of the JContainer
 5   
  * Software License version 1.1, a copy of which has been included
 6   
  * with this distribution in the LICENSE.txt file.
 7   
  */
 8   
 package org.jcontainer.dna;
 9   
 
 10   
 /**
 11   
  * Utility class to signal to the container that
 12   
  * a resource is no longer going to be used by
 13   
  * the component.
 14   
  *
 15   
  * @version $Revision: 1.4 $ $Date: 2003/09/23 08:10:14 $
 16   
  */
 17   
 public class ReleaseUtil
 18   
 {
 19   
     /**
 20   
      * Utility interface used to mark resources that
 21   
      * can be released. Developers should never directly
 22   
      * reference this class and never make a component
 23   
      * implement this interface. Instead the container
 24   
      * will choose to have the proxys of component implement
 25   
      * the interface.
 26   
      */
 27   
     public interface Releaseable
 28   
     {
 29   
         /**
 30   
          * Indicate to the container that component no
 31   
          * longer needs resources.
 32   
          */
 33   
         void release();
 34   
     }
 35   
 
 36   
     /**
 37   
      * The component invokes this method to indicate to
 38   
      * the container that it no longer needs specified
 39   
      * resource.
 40   
      *
 41   
      * @param object the resource
 42   
      */
 43  5
     public static void release( final Object object )
 44   
     {
 45  5
         if( object instanceof Releaseable )
 46   
         {
 47  3
             ( (Releaseable)object ).release();
 48   
         }
 49   
     }
 50   
 }
 51