Clover coverage report - XJavaDoc - 1.1
Coverage timestamp: Sun Oct 3 2004 19:56:54 BST
file stats: LOC: 75   Methods: 5
NCLOC: 29   Classes: 1
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
UnknownClass.java - 62.5% 20% 46.2%
coverage coverage
 1   
 /*
 2   
  * Copyright (c) 2001-2003 The XDoclet team
 3   
  * All rights reserved.
 4   
  */
 5   
 package xjavadoc;
 6   
 
 7   
 import java.lang.reflect.Modifier;
 8   
 
 9   
 /**
 10   
  * This implementation of XClass is used for classes that can't be resolved from
 11   
  * either source or classpath (binary classes). It's useful for XDocletImpl,
 12   
  * especially when classes refer to classes that are going to be generated by
 13   
  * XDocletImpl.
 14   
  *
 15   
  * @author    Ara Abrahamian
 16   
  * @author    Aslak Hellesøy
 17   
  * @created   February 17, 2002
 18   
  */
 19   
 final class UnknownClass extends AbstractClass
 20   
 {
 21   
 
 22   
     public static int  instanceCount = 0;
 23   
 
 24   
     /**
 25   
      * @param qualifiedName
 26   
      * @todo                 We're setting super to java.lang.Object, but if an
 27   
      *      instance represents an unknown interface, then the superclass should be
 28   
      *      null. How do we know whether an instance represents a class or an
 29   
      *      interface? (Aslak)
 30   
      */
 31  20
     public UnknownClass( XJavaDoc xJavaDoc, String qualifiedName )
 32   
     {
 33  20
         super( xJavaDoc, null );
 34  20
         setQualifiedName( qualifiedName );
 35   
         // We don't know what our superclass is, so we'll set it to java.lang.Object to avoid NPE.
 36  20
         setSuperclass( "java.lang.Object" );
 37   
 
 38  20
         addModifier( Modifier.PUBLIC );
 39  20
         instanceCount++;
 40   
     }
 41   
 
 42   
     /**
 43   
      * whether this class can be saved ( it cannot )
 44   
      *
 45   
      * @return   false since this class can not be saved
 46   
      */
 47  0
     public boolean isWriteable()
 48   
     {
 49  0
         return false;
 50   
     }
 51   
 
 52  0
     public boolean isPrimitive()
 53   
     {
 54  0
         return false;
 55   
     }
 56   
 
 57   
     /**
 58   
      * no op for sake of interface implementation
 59   
      */
 60  0
     public void setDirty()
 61   
     {
 62   
     }
 63   
 
 64   
     /**
 65   
      * this class is not intended to be saved
 66   
      *
 67   
      * @return   always false
 68   
      */
 69  0
     public boolean saveNeeded()
 70   
     {
 71  0
         return false;
 72   
     }
 73   
 
 74   
 }
 75