+ /**
+ * HELPER: writePropertiesJavaPermission() writes the permission in properties
+ */
+ private void writePropertiesJavaPermission(String intface, InterfaceDecl intDecl) {
+
+ Map<String,Set<String>> mapNewIntMethods = mapInt2NewInts.get(intface);
+ for (Map.Entry<String,Set<String>> intMeth : mapNewIntMethods.entrySet()) {
+ String newIntface = intMeth.getKey();
+ int newObjectId = mapNewIntfaceObjId.get(newIntface);
+ println("private final static int object" + newObjectId + "Id = " +
+ newObjectId + ";\t//" + newIntface);
+ Set<String> methodIds = intMeth.getValue();
+ print("private static Integer[] object" + newObjectId + "Permission = { ");
+ int i = 0;
+ for (String methodId : methodIds) {
+ int methodNumId = intDecl.getMethodNumId(methodId);
+ print(Integer.toString(methodNumId));
+ // Check if this is the last element (don't print a comma)
+ if (i != methodIds.size() - 1) {
+ print(", ");
+ }
+ i++;
+ }
+ println(" };");
+ println("private List<Integer> set" + newObjectId + "Allowed;");
+ }
+ }
+
+