예제 #1
0
 Map<String, Set<Integer>> findCandidateUnionDecisions() {
   Map<String, Set<Integer>> candidateUnionDecisions = new HashMap<String, Set<Integer>>();
   for (InferredType subelt : structTypes) {
     candidateUnionDecisions.putAll(subelt.findCandidateUnionDecisions());
   }
   return candidateUnionDecisions;
 }
예제 #2
0
 Map<String, Set<Integer>> findCandidateUnionDecisions() {
   HashSet<Integer> curDecisions = new HashSet<Integer>();
   for (int i = 0; i < unionTypes.size(); i++) {
     for (int j = i + 1; j < unionTypes.size(); j++) {
       List<String> iBases = unionTypes.get(i).getBases();
       List<String> jBases = unionTypes.get(j).getBases();
       if (isPrefixOf(iBases, jBases) || isPrefixOf(jBases, iBases)) {
         curDecisions.add(i);
         curDecisions.add(j);
       }
     }
   }
   Map<String, Set<Integer>> candidateUnionDecisions = new HashMap<String, Set<Integer>>();
   for (InferredType subelt : unionTypes) {
     candidateUnionDecisions.putAll(subelt.findCandidateUnionDecisions());
   }
   if (curDecisions.size() > 0) {
     candidateUnionDecisions.put(name, curDecisions);
   }
   return candidateUnionDecisions;
 }
예제 #3
0
 Map<String, Set<Integer>> findCandidateUnionDecisions() {
   return bodyType.findCandidateUnionDecisions();
 }