KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > junit > launcher > ITestFinder


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  * David Saff (saff@mit.edu) - initial API and implementation
11  * (bug 102632: [JUnit] Support for JUnit 4.)
12  *******************************************************************************/

13
14 package org.eclipse.jdt.internal.junit.launcher;
15
16 import java.util.Set JavaDoc;
17
18 import org.eclipse.core.runtime.CoreException;
19 import org.eclipse.core.runtime.IProgressMonitor;
20
21 import org.eclipse.jdt.core.IJavaElement;
22 import org.eclipse.jdt.core.IType;
23
24 /**
25  * Interface to be implemented by for extension point
26  * org.eclipse.jdt.junit.internal_testKinds.
27  */

28 public interface ITestFinder {
29     ITestFinder NULL= new ITestFinder() {
30         public void findTestsInContainer(IJavaElement element, Set JavaDoc result, IProgressMonitor pm) {
31             // do nothing
32
}
33
34         public boolean isTest(IType type) {
35             return false;
36         }
37     };
38
39     /**
40      * @param element element to search for tests
41      * @param result a Set to add ITypes
42      * @param pm
43      */

44     public abstract void findTestsInContainer(IJavaElement element, Set JavaDoc/*<IType>*/ result, IProgressMonitor pm) throws CoreException;
45     
46     public abstract boolean isTest(IType type) throws CoreException;
47 }
48
Popular Tags