Clover coverage report - groovy - 1.0-beta-8
Coverage timestamp: Fri Dec 17 2004 14:55:55 GMT
file stats: LOC: 85   Methods: 6
NCLOC: 40   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
ClassCompletionVerifier.java 0% 0% 0% 0%
coverage
 1   
 /*******************************************************************************
 2   
  * Copyright (c) 2004 IBM Corporation and others.
 3   
  * All rights reserved.   This program and the accompanying materials
 4   
  * are made available under the terms of the Common Public License v1.0
 5   
  * which accompanies this distribution, and is available at
 6   
  * http://www.eclipse.org/legal/cpl-v10.html
 7   
  * 
 8   
  * Contributors:
 9   
  * IBM - Initial API and implementation
 10   
  ******************************************************************************/
 11   
 
 12   
 
 13   
 package org.codehaus.groovy.classgen;
 14   
 
 15   
 import java.util.ArrayList;
 16   
 import java.util.Iterator;
 17   
 import java.util.List;
 18   
 
 19   
 import org.codehaus.groovy.ast.ClassNode;
 20   
 import org.codehaus.groovy.ast.ConstructorNode;
 21   
 import org.codehaus.groovy.ast.FieldNode;
 22   
 import org.codehaus.groovy.ast.GroovyClassVisitor;
 23   
 import org.codehaus.groovy.ast.MethodNode;
 24   
 import org.codehaus.groovy.ast.PropertyNode;
 25   
 import org.objectweb.asm.Constants;
 26   
 
 27   
 
 28   
 /**
 29   
  * ClassCompletionVerifier
 30   
  * 
 31   
  */
 32   
 public class ClassCompletionVerifier implements Constants, GroovyClassVisitor {
 33   
     
 34   
     ClassNode classNode;
 35   
     
 36  0
     public ClassNode getClassNode() {
 37  0
         return classNode;
 38   
     }
 39   
     
 40   
 
 41   
     /* (non-Javadoc)
 42   
      * @see org.codehaus.groovy.ast.GroovyClassVisitor#visitClass(org.codehaus.groovy.ast.ClassNode)
 43   
      */
 44  0
     public void visitClass(ClassNode a_node) {
 45  0
         classNode = a_node;
 46  0
         if ((classNode.getModifiers() & Constants.ACC_ABSTRACT) == 0 ) {
 47  0
             List abstractMethods = classNode.getAbstractMethods();
 48  0
             if (abstractMethods != null) {
 49  0
                 List methodNames = new ArrayList();
 50  0
                 for (Iterator iter = abstractMethods.iterator(); iter.hasNext();) {
 51  0
                     MethodNode method = (MethodNode) iter.next();
 52  0
                     String methodName = method.getTypeDescriptor();
 53  0
                     methodNames.add(methodName);                
 54   
                 }
 55  0
                 throw new RuntimeIncompleteClassException(methodNames, classNode);
 56   
             }
 57   
         }
 58   
     }
 59   
 
 60   
     /* (non-Javadoc)
 61   
      * @see org.codehaus.groovy.ast.GroovyClassVisitor#visitConstructor(org.codehaus.groovy.ast.ConstructorNode)
 62   
      */
 63  0
     public void visitConstructor(ConstructorNode a_node) {
 64   
     }
 65   
 
 66   
     /* (non-Javadoc)
 67   
      * @see org.codehaus.groovy.ast.GroovyClassVisitor#visitMethod(org.codehaus.groovy.ast.MethodNode)
 68   
      */
 69  0
     public void visitMethod(MethodNode a_node) {
 70   
     }
 71   
 
 72   
     /* (non-Javadoc)
 73   
      * @see org.codehaus.groovy.ast.GroovyClassVisitor#visitField(org.codehaus.groovy.ast.FieldNode)
 74   
      */
 75  0
     public void visitField(FieldNode a_node) {
 76   
     }
 77   
 
 78   
     /* (non-Javadoc)
 79   
      * @see org.codehaus.groovy.ast.GroovyClassVisitor#visitProperty(org.codehaus.groovy.ast.PropertyNode)
 80   
      */
 81  0
     public void visitProperty(PropertyNode a_node) {
 82   
     }
 83   
 
 84   
 }
 85