}
static
Priority getExpectedPrioriy(CT ctParam) {
Priority priority = ctParam.priority;
if(priority != null)
return priority;
String catstr = ctParam.catstr;
for(int i = catstr.lastIndexOf('.', catstr.length()-1); i >= 0;
i = catstr.lastIndexOf('.', i-1)) {
String substr = catstr.substring(0, i);
// find the priority of ct corresponding to substr
for(int j = 0; j < LENGTH; j++) {
if(ct[j] != null && substr.equals(ct[j].catstr)) {
Priority p = ct[j].priority;
if(p != null)
return p;
}
}
}