public List<String> getMethods(String cap) {
int index = listCapabs.indexOf(cap);
+ // If index=-1, it means that it's not found.
+ // There is perhaps a discrepancy in the policy file
+ // between the list of capabilities and requires
+ // sections
+ if (index == -1)
+ throw new Error("CapabilityDecl: Capability " + cap +
+ " does not exist in this interface! Please check your (requires) policy file...");
return listMethods.get(index);
}
}