Blame view

circus/src/jcircus/complexcomms/StackVarEnvAnn.java 1.08 KB
8d0dc533f   Madiel de Souza Conserva Filho   first
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  package jcircus.complexcomms;
  
  import jcircus.complementaryenvs.StackVarEnv;
  
  public class StackVarEnvAnn {
  	private StackVarEnv sve;
  	private String name; //the name of the action that has that stack variables environment
  	private String contentOfStackVarEnv = "";
  	public StackVarEnvAnn (String name, StackVarEnv sve) {
  		this.name = name;
  		this.sve = new StackVarEnv (sve);
  		this.contentOfStackVarEnv = this.toString();
  	}
  	public StackVarEnvAnn (String name) {
  		this (name, new StackVarEnv ());
  	}
  	public StackVarEnvAnn (StackVarEnv sve) {
  		this ("StackVarEnvAnn", sve);
  	}
  	public StackVarEnv getStackVarEnv () {
  		return this.sve;
  	}
  	public void setStackVarEnv (StackVarEnv sveparam) {
  		this.sve = sveparam;
  	}
  	public String toString () {
  		String str = this.name + " {";
  		Object [] keys = sve.keySet().toArray();
  		for (int i = 0; i < keys.length; i++) {
  			str = str + ((String) keys [i]) + " -> " + this.sve.get((String) keys [i]);
  			if (i < keys.length - 1) {
  				str = str + ", ";
  			}
  			if (((String)keys [i]).equals("x1")) {
  				System.out.print ("");
  			}
  		}
  		return str + "}";
  	}
  }