package edu.uci.eecs.specCompiler.specExtraction;
+import java.util.ArrayList;
+import java.util.HashMap;
+
public class InterfaceConstruct extends Construct {
+ public final String name;
+ public final ArrayList<String> commitPointSet;
+ public final String condition;
+ public final HashMap<String, String> hbConditions;
+ public final String idCode;
+ public final String check;
+ public final String action;
+ public final String postAction;
+ public final String postCheck;
+ public InterfaceConstruct(String name, ArrayList<String> commitPointSet,
+ String condition, HashMap<String, String> hbConditions, String idCode,
+ String check, String action, String postAction, String postCheck) {
+ this.name = name;
+ this.commitPointSet = commitPointSet;
+ this.condition = condition;
+ this.hbConditions = hbConditions;
+ this.idCode = idCode;
+ this.check = check;
+ this.action = action;
+ this.postAction = postAction;
+ this.postCheck = postCheck;
+ }
+
+ public String toString() {
+ StringBuilder sb = new StringBuilder("InterfaceConstruct:\n");
+ sb.append("@Interface: " + name + "\n");
+ sb.append("@Commit_point_set: ");
+ for (String commitPoint : commitPointSet) {
+ sb.append(commitPoint + " | ");
+ }
+ sb.append(".\n");
+ sb.append("@Condition: ");
+ sb.append(condition + "\n");
+ sb.append("@HBConditions: \n");
+ for (String hbLabel : hbConditions.keySet()) {
+ String hbCondition = hbConditions.get(hbLabel);
+ sb.append(hbLabel + " :: " + hbCondition + "\n");
+ }
+ sb.append("@ID: ");
+ sb.append(idCode + "\n");
+ sb.append("@Check: " + check + "\n");
+ sb.append("@Action:\n");
+ sb.append(action + "\n");
+ sb.append("@Post_action:\n");
+ sb.append(postAction + "\n");
+ sb.append("@Post_check: " + postCheck + "\n");
+
+ return sb.toString();
+ }
}