Adding struct support for Java in compiler
[iot2.git] / iotjava / iotpolicy / tree / StructDecl.java
index ef58b55..75ef1d1 100644 (file)
@@ -105,4 +105,14 @@ public class StructDecl extends Declaration {
                int index = listStructs.indexOf(structType);
                return listMembers.get(index);
        }
+
+
+       /**
+        * getNumOfMembers() gets number of members
+        */
+       public int getNumOfMembers(String structType) {
+
+               int index = listStructs.indexOf(structType);
+               return listMembers.get(index).size();
+       }
 }