1 package edu.uci.eecs.specCompiler.specExtraction;
4 import java.util.ArrayList;
5 import java.util.HashMap;
7 public class InterfaceConstruct extends Construct {
8 public final String name;
9 public final ArrayList<String> commitPointSet;
10 public final String condition;
11 public final HashMap<String, String> hbConditions;
12 public final String idCode;
13 public final String check;
14 public final ActionSubConstruct action;
15 public final String postAction;
16 public final String postCheck;
18 public InterfaceConstruct(File file, int beginLineNum, String name,
19 ArrayList<String> commitPointSet, String condition,
20 HashMap<String, String> hbConditions, String idCode, String check,
21 ActionSubConstruct action, String postAction, String postCheck) {
22 super(file, beginLineNum);
24 this.commitPointSet = commitPointSet;
25 this.condition = condition;
26 this.hbConditions = hbConditions;
30 this.postAction = postAction;
31 this.postCheck = postCheck;
34 public String toString() {
35 StringBuilder sb = new StringBuilder("InterfaceConstruct:\n");
36 sb.append("@Interface: " + name + "\n");
37 sb.append("@Commit_point_set: ");
38 for (String commitPoint : commitPointSet) {
39 sb.append(commitPoint + " | ");
42 sb.append("@Condition: ");
43 sb.append(condition + "\n");
44 sb.append("@HBConditions: \n");
45 for (String hbLabel : hbConditions.keySet()) {
46 String hbCondition = hbConditions.get(hbLabel);
47 sb.append(hbLabel + " :: " + hbCondition + "\n");
50 sb.append(idCode + "\n");
51 sb.append("@Check: " + check + "\n");
52 sb.append(action + "\n");
53 sb.append("@Post_action:\n");
54 sb.append(postAction + "\n");
55 sb.append("@Post_check: " + postCheck + "\n");