Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.cactus.integration.maven
Class CactusScanner  view CactusScanner download CactusScanner.java

java.lang.Object
  extended byorg.apache.cactus.integration.maven.CactusScanner

public class CactusScanner
extends java.lang.Object

Process org.apache.tools.ant.types.FileSet and extracts classes that are Cactus tests. As a Cactus test can be a simple JUnit test case wrapped in a Cactus suite, it is very difficult to find out only Cactus tests. Thus, in this version, we are only finding JUnit tests. A class is considered to be a JUnit Test Case if:

Version:
$Id: CactusScanner.java,v 1.3 2004/02/29 16:34:44 vmassol Exp $

Field Summary
private  java.util.List cactusTests
          Lists of Cactus class names that were found in the org.apache.tools.ant.types.FileSet
private  org.apache.commons.logging.Log log
          Log instance.
private  org.apache.tools.ant.Project project
          The Ant project
 
Constructor Summary
CactusScanner()
           
 
Method Summary
 void clear()
          Remove all Cactus class names that were found in the Fileset
private  java.lang.ClassLoader createClassLoader(org.apache.tools.ant.types.Path theClasspath)
           
private  boolean isJUnitTestCase(java.lang.String theClassName, org.apache.tools.ant.types.Path theClasspath)
           
 java.util.Iterator iterator()
           
private  java.lang.Class loadClass(java.lang.String theClassName, org.apache.tools.ant.types.Path theClasspath)
           
 void processFileSet(org.apache.tools.ant.types.FileSet theFileset, org.apache.tools.ant.types.Path theClasspath)
          Finds the Cactus test cases from a list of files.
 void setProject(org.apache.tools.ant.Project theProject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private org.apache.commons.logging.Log log
Log instance.


project

private org.apache.tools.ant.Project project
The Ant project


cactusTests

private java.util.List cactusTests
Lists of Cactus class names that were found in the org.apache.tools.ant.types.FileSet

Constructor Detail

CactusScanner

public CactusScanner()
Method Detail

setProject

public void setProject(org.apache.tools.ant.Project theProject)

clear

public void clear()
Remove all Cactus class names that were found in the Fileset


iterator

public java.util.Iterator iterator()

processFileSet

public void processFileSet(org.apache.tools.ant.types.FileSet theFileset,
                           org.apache.tools.ant.types.Path theClasspath)
Finds the Cactus test cases from a list of files.


isJUnitTestCase

private boolean isJUnitTestCase(java.lang.String theClassName,
                                org.apache.tools.ant.types.Path theClasspath)

loadClass

private java.lang.Class loadClass(java.lang.String theClassName,
                                  org.apache.tools.ant.types.Path theClasspath)

createClassLoader

private java.lang.ClassLoader createClassLoader(org.apache.tools.ant.types.Path theClasspath)