forked from JavaTX/JavaCompilerCore
Generic generator algorithm v0.1
This commit is contained in:
parent
7a4bc32974
commit
87d0a46ba5
@ -71,6 +71,18 @@ public class GenericsGenerator {
|
||||
|
||||
final List<String> methodTPHs = tphExtractor.ListOfMethodsAndTph.stream().map(m -> m.getLocalTphs())
|
||||
.flatMap(l -> l.stream()).collect(Collectors.toList());
|
||||
|
||||
createConstraintsForClassTphs(simplifiedConstraints, tphsClass, constraints, allCons, visitedTPHs, methodTPHs);
|
||||
|
||||
GenericsGeneratorUtility.addTPHsToClassTPHs(constraints, tphsClass);
|
||||
GenericsGeneratorUtility.removeClassTPHsFromMethodTPHs(tphsClass, tphExtractor);
|
||||
|
||||
generateGGConstraintsForTPH(tphsClass, constraints, simplifiedConstraints);
|
||||
|
||||
return constraints;
|
||||
}
|
||||
|
||||
private static void createConstraintsForClassTphs(ConstraintsSimplierResult simplifiedConstraints, List<String> tphsClass, List<GenericsGeneratorResult> constraints, List<TPHConstraint> allCons, Set<String> visitedTPHs, List<String> methodTPHs) {
|
||||
for (String tph : tphsClass) {
|
||||
|
||||
if (visitedTPHs.contains(tph))
|
||||
@ -83,13 +95,6 @@ public class GenericsGenerator {
|
||||
constraints.add(constraint);
|
||||
}
|
||||
}
|
||||
|
||||
GenericsGeneratorUtility.addTPHsToClassTPHs(constraints, tphsClass);
|
||||
GenericsGeneratorUtility.removeClassTPHsFromMethodTPHs(tphsClass, tphExtractor);
|
||||
|
||||
generateGGConstraintsForTPH(tphsClass, constraints, simplifiedConstraints);
|
||||
|
||||
return constraints;
|
||||
}
|
||||
|
||||
private static GenericsGeneratorResult generateGGResultForClass(LinkedList<String> tphsInRel,
|
||||
|
Loading…
Reference in New Issue
Block a user