1 package edu.uci.eecs.specCompiler.specExtraction;
3 import java.util.ArrayList;
4 import java.util.HashMap;
6 public class InterfaceConstruct extends Construct {
7 public final String name;
8 public final ArrayList<String> commitPointSet;
9 public final String condition;
10 public final HashMap<String, String> hbConditions;
11 public final String idCode;
12 public final String check;
13 public final ActionSubConstruct action;
14 public final String postAction;
15 public final String postCheck;
17 public InterfaceConstruct(String name, ArrayList<String> commitPointSet,
18 String condition, HashMap<String, String> hbConditions, String idCode,
19 String check, ActionSubConstruct action, String postAction, String postCheck) {
21 this.commitPointSet = commitPointSet;
22 this.condition = condition;
23 this.hbConditions = hbConditions;
27 this.postAction = postAction;
28 this.postCheck = postCheck;
31 public String toString() {
32 StringBuilder sb = new StringBuilder("InterfaceConstruct:\n");
33 sb.append("@Interface: " + name + "\n");
34 sb.append("@Commit_point_set: ");
35 for (String commitPoint : commitPointSet) {
36 sb.append(commitPoint + " | ");
39 sb.append("@Condition: ");
40 sb.append(condition + "\n");
41 sb.append("@HBConditions: \n");
42 for (String hbLabel : hbConditions.keySet()) {
43 String hbCondition = hbConditions.get(hbLabel);
44 sb.append(hbLabel + " :: " + hbCondition + "\n");
47 sb.append(idCode + "\n");
48 sb.append("@Check: " + check + "\n");
49 sb.append(action + "\n");
50 sb.append("@Post_action:\n");
51 sb.append(postAction + "\n");
52 sb.append("@Post_check: " + postCheck + "\n");