EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.simucomframework.variables.userdata]

COVERAGE SUMMARY FOR SOURCE FILE [UserData.java]

nameclass, %method, %block, %line, %
UserData.java0%   (0/2)0%   (0/8)0%   (0/84)0%   (0/21)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class UserData0%   (0/1)0%   (0/4)0%   (0/63)0%   (0/13)
<static initializer> 0%   (0/1)0%   (0/5)0%   (0/3)
UserData (): void 0%   (0/1)0%   (0/8)0%   (0/3)
addUserData (String, String, Object): void 0%   (0/1)0%   (0/11)0%   (0/2)
overwriteParametersForAssemblyContext (String, SimulatedStackframe): void 0%   (0/1)0%   (0/39)0%   (0/5)
     
class UserDataEntry0%   (0/1)0%   (0/4)0%   (0/21)0%   (0/8)
UserDataEntry (String, String, Object): void 0%   (0/1)0%   (0/12)0%   (0/5)
getAssemblyContextID (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getValue (): Object 0%   (0/1)0%   (0/3)0%   (0/1)
getVariableName (): String 0%   (0/1)0%   (0/3)0%   (0/1)

1package de.uka.ipd.sdq.simucomframework.variables.userdata;
2 
3import java.util.ArrayList;
4import java.util.List;
5 
6import org.apache.log4j.Logger;
7 
8import de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe;
9 
10 
11public class UserData {
12 
13        List<UserDataEntry> userData = new ArrayList<UserDataEntry>();
14        
15        private static Logger logger = 
16                Logger.getLogger(SimulatedStackframe.class.getName());
17        
18        public UserData(){
19                
20        }
21        
22        public void addUserData(String variableName, String assemblyContextID, Object value){
23                userData.add(new UserDataEntry(variableName, assemblyContextID, value));
24        }
25        
26        public void overwriteParametersForAssemblyContext(String assemblyContext, SimulatedStackframe<Object> currentStackframe){
27                
28                for (UserDataEntry userDataEntry : userData) {
29                        if (assemblyContext.equals(userDataEntry.getAssemblyContextID())){
30                                currentStackframe.addValue(userDataEntry.getVariableName(), userDataEntry.getValue());
31                                logger.info("Storing variable "+userDataEntry.getVariableName()+" for AssemblyContext "+userDataEntry.getAssemblyContextID());
32                        }
33                }
34                
35                
36        }
37        
38 
39}
40 
41class UserDataEntry {
42        
43        private String variableName;
44        private String assemblyContextID;
45        
46        private Object value;
47        
48        public UserDataEntry(String assemblyContextID, String variableName, 
49                        Object value) {
50                super();
51                this.variableName = variableName;
52                this.assemblyContextID = assemblyContextID;
53                this.value = value;
54        }
55        
56        public String getVariableName() {
57                return variableName;
58        }
59 
60        public String getAssemblyContextID() {
61                return assemblyContextID;
62        }
63 
64        public Object getValue() {
65                return value;
66        }
67        
68}

[all classes][de.uka.ipd.sdq.simucomframework.variables.userdata]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov