|
1
|
|
package fi.eis.libraries.di.context.deployment; |
|
2
|
|
|
|
3
|
|
import fi.eis.libraries.di.context.Context; |
|
4
|
|
import fi.eis.libraries.di.context.Module; |
|
5
|
|
import fi.eis.libraries.di.logger.LogLevel; |
|
6
|
|
|
|
7
|
|
import java.io.File; |
|
8
|
|
import java.util.List; |
|
9
|
|
|
|
10
|
|
/** |
|
11
|
|
* <p> |
|
12
|
|
* A "Deployment Unit" is a .jar file or a directory path of the class given as a parameter. |
|
13
|
|
* </p> |
|
14
|
|
* |
|
15
|
|
* @author eis |
|
16
|
|
*/ |
|
17
|
|
public class DeploymentUnitContext extends Context { |
|
18
|
|
|
|
19
|
|
public DeploymentUnitContext(Class sourceClass) { |
|
20
|
1
1. <init> : Substituted 0 with 1 → KILLED
|
super(); |
|
21
|
|
// a jar or a directory path of whoever initiated us |
|
22
|
5
1. <init> : removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::initFrom → KILLED
2. <init> : removed call to java/security/ProtectionDomain::getCodeSource → KILLED
3. <init> : removed call to java/lang/Class::getProtectionDomain → KILLED
4. <init> : removed call to java/security/CodeSource::getLocation → KILLED
5. <init> : removed call to fi/eis/libraries/di/context/deployment/BeanArchive::<init> → KILLED
|
initFrom(new BeanArchive(sourceClass.getProtectionDomain().getCodeSource().getLocation())); |
|
23
|
|
} |
|
24
|
|
|
|
25
|
|
public DeploymentUnitContext(Class sourceClass, LogLevel logLevel) { |
|
26
|
1
1. <init> : Substituted 0 with 1 → KILLED
|
super(); |
|
27
|
1
1. <init> : removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::setLogLevel → KILLED
|
setLogLevel(logLevel); |
|
28
|
|
BeanArchive beanArchive = new BeanArchive( |
|
29
|
4
1. <init> : removed call to fi/eis/libraries/di/context/deployment/BeanArchive::<init> → KILLED
2. <init> : removed call to java/security/ProtectionDomain::getCodeSource → KILLED
3. <init> : removed call to java/lang/Class::getProtectionDomain → KILLED
4. <init> : removed call to java/security/CodeSource::getLocation → KILLED
|
sourceClass.getProtectionDomain().getCodeSource().getLocation(), |
|
30
|
|
logLevel); |
|
31
|
1
1. <init> : removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::initFrom → KILLED
|
initFrom(beanArchive); |
|
32
|
|
} |
|
33
|
|
|
|
34
|
|
public DeploymentUnitContext(File sourceJar) { |
|
35
|
1
1. <init> : Substituted 0 with 1 → KILLED
|
super(); |
|
36
|
2
1. <init> : removed call to fi/eis/libraries/di/context/deployment/BeanArchive::<init> → KILLED
2. <init> : removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::initFrom → KILLED
|
initFrom(new BeanArchive(sourceJar)); |
|
37
|
|
} |
|
38
|
|
|
|
39
|
|
public DeploymentUnitContext(File sourceJar, LogLevel logLevel) { |
|
40
|
1
1. <init> : Substituted 0 with 1 → NO_COVERAGE
|
super(); |
|
41
|
1
1. <init> : removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::setLogLevel → NO_COVERAGE
|
setLogLevel(logLevel); |
|
42
|
1
1. <init> : removed call to fi/eis/libraries/di/context/deployment/BeanArchive::<init> → NO_COVERAGE
|
BeanArchive archive = new BeanArchive(sourceJar, logLevel); |
|
43
|
1
1. <init> : removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::initFrom → NO_COVERAGE
|
initFrom(archive); |
|
44
|
|
} |
|
45
|
|
|
|
46
|
|
private void initFrom(BeanArchive builder) { |
|
47
|
1
1. initFrom : removed call to fi/eis/libraries/di/context/deployment/BeanArchive::getClasses → KILLED
|
List<Class> classes = builder.getClasses(); |
|
48
|
|
logger.debug("got classes " + classes); |
|
49
|
2
1. initFrom : removed call to java/util/List::add → KILLED
2. initFrom : removed call to fi/eis/libraries/di/context/Module::<init> → KILLED
|
super.modules.add(new Module(classes)); |
|
50
|
|
} |
|
51
|
|
|
|
52
|
|
} |
| | Mutations |
| 20 |
|
1.1 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) Substituted 0 with 1 → KILLED
|
| 22 |
|
1.1 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::initFrom → KILLED
2.2 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to java/security/ProtectionDomain::getCodeSource → KILLED
3.3 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to java/lang/Class::getProtectionDomain → KILLED
4.4 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to java/security/CodeSource::getLocation → KILLED
5.5 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to fi/eis/libraries/di/context/deployment/BeanArchive::<init> → KILLED
|
| 26 |
|
1.1 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) Substituted 0 with 1 → KILLED
|
| 27 |
|
1.1 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDiLoggingEnabled(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::setLogLevel → KILLED
|
| 29 |
|
1.1 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to fi/eis/libraries/di/context/deployment/BeanArchive::<init> → KILLED
2.2 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to java/security/ProtectionDomain::getCodeSource → KILLED
3.3 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to java/lang/Class::getProtectionDomain → KILLED
4.4 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to java/security/CodeSource::getLocation → KILLED
|
| 31 |
|
1.1 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest.testDiLoggingDisabled(fi.eis.libraries.di.test.deploymentunit.DIClassScanningTest) removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::initFrom → KILLED
|
| 35 |
|
1.1 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest) Substituted 0 with 1 → KILLED
|
| 36 |
|
1.1 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest.testDiWithNonExistingFile(fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest) removed call to fi/eis/libraries/di/context/deployment/BeanArchive::<init> → KILLED
2.2 Location : <init> Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest) removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::initFrom → KILLED
|
| 40 |
|
1.1 Location : <init> Killed by : none Substituted 0 with 1 → NO_COVERAGE
|
| 41 |
|
1.1 Location : <init> Killed by : none removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::setLogLevel → NO_COVERAGE
|
| 42 |
|
1.1 Location : <init> Killed by : none removed call to fi/eis/libraries/di/context/deployment/BeanArchive::<init> → NO_COVERAGE
|
| 43 |
|
1.1 Location : <init> Killed by : none removed call to fi/eis/libraries/di/context/deployment/DeploymentUnitContext::initFrom → NO_COVERAGE
|
| 47 |
|
1.1 Location : initFrom Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest) removed call to fi/eis/libraries/di/context/deployment/BeanArchive::getClasses → KILLED
|
| 49 |
|
1.1 Location : initFrom Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest) removed call to java/util/List::add → KILLED
2.2 Location : initFrom Killed by : fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest.testDi(fi.eis.libraries.di.test.deploymentunit.DIClassScanningJarLoadingTest) removed call to fi/eis/libraries/di/context/Module::<init> → KILLED
|