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 |
14
1. exists : replaced boolean return with false for fr/sii/ogham/core/util/ClasspathUtils::exists → NO_COVERAGE 2. exists : replaced boolean return with true for fr/sii/ogham/core/util/ClasspathUtils::exists → SURVIVED 3. exists : replaced boolean return with true for fr/sii/ogham/core/util/ClasspathUtils::exists → NO_COVERAGE 4. exists : replaced boolean return with false for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED 5. exists : replaced boolean return with false for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED 6. exists : replaced boolean return with false for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED 7. exists : replaced boolean return with false for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED 8. exists : replaced boolean return with false for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED 9. exists : replaced boolean return with false for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED 10. exists : replaced boolean return with false for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED 11. exists : replaced boolean return with true for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED 12. exists : replaced boolean return with true for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED 13. exists : replaced boolean return with true for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED 14. exists : replaced boolean return with true for fr/sii/ogham/core/util/ClasspathUtils::exists → KILLED |
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 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 10.10 11.11 12.12 13.13 14.14 |