ClasspathUtils.java

1
package fr.sii.ogham.core.util;
2
3
import fr.sii.ogham.core.util.classpath.ClasspathHelper;
4
import fr.sii.ogham.core.util.classpath.SimpleClasspathHelper;
5
6
/**
7
 * Helper for classpath management.
8
 * 
9
 * @author Aurélien Baudet
10
 *
11
 */
12
public final class ClasspathUtils {
13
	private static ClasspathHelper helper;
14
	
15
	static {
16
		helper = new SimpleClasspathHelper();
17
	}
18
19
	/**
20
	 * Test if the class name is defined in the classpath.
21
	 *
22
	 * @param className
23
	 *            the class name
24
	 * @return true if the class exists in the classpath, false otherwise
25
	 */
26
	public static boolean exists(String className) {
27 2 1. exists : replaced boolean return with true for fr/sii/ogham/core/util/ClasspathUtils::exists → RUN_ERROR
2. exists : replaced boolean return with false for fr/sii/ogham/core/util/ClasspathUtils::exists → RUN_ERROR
		return helper.exists(className);
28
	}
29
30
	public static void setHelper(ClasspathHelper helper) {
31
		ClasspathUtils.helper = helper;
32
	}
33
	
34
	public static void reset() {
35
		ClasspathUtils.helper = new SimpleClasspathHelper();
36
	}
37
	
38
	private ClasspathUtils() {
39
		super();
40
	}
41
42
}

Mutations

27

1.1
Location : exists
Killed by :
replaced boolean return with true for fr/sii/ogham/core/util/ClasspathUtils::exists → RUN_ERROR

2.2
Location : exists
Killed by :
replaced boolean return with false for fr/sii/ogham/core/util/ClasspathUtils::exists → RUN_ERROR

Active mutators

Tests examined


Report generated by PIT 1.13.1