KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > uka > ipd > coverage > natures > all_uses > AllUsesCompleteCoverage


1 /*
2  * Created on Apr 22, 2005
3  *
4  * written by Matthias Kempka
5  */

6 package de.uka.ipd.coverage.natures.all_uses;
7
8 import java.util.HashMap JavaDoc;
9 import java.util.Map JavaDoc;
10
11 import org.apache.bcel.classfile.JavaClass;
12
13 import de.uka.ipd.coverage.natures.CompleteCoverage;
14 import de.uka.ipd.coverage.natures.ISourceCodeLine;
15 import de.uka.ipd.coverage.recording.CoverageState;
16
17 /**
18  * Created on Apr 22, 2005
19  * @author Matthias Kempka
20  */

21 public class AllUsesCompleteCoverage extends CompleteCoverage {
22
23     private Map JavaDoc usesMap = new HashMap JavaDoc();
24
25     public AllUsesCompleteCoverage(JavaClass jclass) {
26         super(jclass);
27     }
28
29     /**
30      * @param line
31      * @param state
32      * @param message
33      * @param usesCoverage
34      */

35     public void addLine(Definition def, CoverageState state, String JavaDoc message, UsesCoverage usesCoverage) {
36         super.addLine(def, state, message);
37         this.usesMap.put(def, usesCoverage);
38     }
39
40     
41     public UsesCoverage getUsesCoverage(ISourceCodeLine line) {
42         return (UsesCoverage) usesMap.get(line);
43     }
44 }
45
Popular Tags