DescEntry parent, boolean debug) {
String line = "";
String old_ifc_name = "";
ArrayList ifc_names = new ArrayList();
ArrayList meth_names = new ArrayList();
DescEntry ifcDesc = null;
DescEntry methDesc = null;
String entryType = "service";
while (line != null) {
try {
line = cvsFile.readLine();
if ((line != null) && (line.length() > 0)) {
String ifc_name = line.substring(line.indexOf(";") + 2,
line.lastIndexOf(";") - 1);
String meth_name = line.substring(line.lastIndexOf(";") + 2,
line.length() - 1);
methDesc = new DescEntry();
if (meth_name.indexOf("#optional") > 0) {
methDesc.isOptional = true;
meth_name = meth_name.substring(0,
meth_name.indexOf("#"));
}
if (meth_name.endsWith("()")) {
methDesc.EntryType = "method";
entryType = "interface";
} else {
methDesc.EntryType = "property";
entryType = "service";
}
methDesc.entryName = meth_name;
methDesc.isToTest = true;
String withoutHash = ifc_name;
if (ifc_name.indexOf("#optional") > 0) {
withoutHash = ifc_name.substring(0,
ifc_name.indexOf("#"));
}
methDesc.longName = parent.entryName + "::" +
withoutHash + "::" + meth_name;
if (!ifc_name.equals(old_ifc_name)) {
if (ifcDesc != null) {
ifcDesc.SubEntries = getDescArray(
meth_names.toArray());
ifcDesc.SubEntryCount = meth_names.size();
//mark service/interface as optional if all methods/properties are optional
boolean allOptional = true;
for (int k = 0; k < ifcDesc.SubEntryCount; k++) {
if (!ifcDesc.SubEntries[k].isOptional) {
allOptional = false;
}
}
if (!ifcDesc.isOptional && allOptional) {
ifcDesc.isOptional = allOptional;
}
meth_names.clear();
ifc_names.add(ifcDesc);
}
ifcDesc = new DescEntry();
ifcDesc.isToTest = true;
old_ifc_name = ifc_name;
if (ifc_name.indexOf("#optional") > 0) {
ifcDesc.isOptional = true;