modified: src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java

This commit is contained in:
AluAli 2021-03-13 14:52:38 +01:00
parent 54de28c3f0
commit 55e44d62de

View File

@ -496,8 +496,9 @@ public class FamilyOfGeneratedGenerics {
r = Relation.EQUAL;
}
MethodConstraint mc = new MethodConstraint(ta1, ta2, r);
System.out.println(mc);
tempMC.add(mc);
if(!checkForDuplicates(mc, tempMC)) {
tempMC.add(mc);
}
}
return tempMC;
}
@ -522,9 +523,14 @@ public class FamilyOfGeneratedGenerics {
if(p.GetOperator() == PairOperator.SMALLERDOT) {
r = Relation.EXTENDS;
orConsWithEXTENDS.add(new TPHConstraint(((TypePlaceholder) p.TA1).getName(), ((TypePlaceholder) p.TA2).getName(), r));
tempMC.add(new MethodConstraint(((TypePlaceholder) (resSet.resolveType(((TypePlaceholder) p.TA1)).resolvedType)).getName(), ((TypePlaceholder) (resSet.resolveType(((TypePlaceholder) p.TA2)).resolvedType)).getName(), r));
} else if(p.GetOperator() == PairOperator.EQUALSDOT) {
r = Relation.EQUAL;
orConsWithEQUAL.add(new TPHConstraint(((TypePlaceholder) p.TA1).getName(), ((TypePlaceholder) p.TA2).getName(), r));
MethodConstraint mc = new MethodConstraint(((TypePlaceholder) (resSet.resolveType(((TypePlaceholder) p.TA1)).resolvedType)).getName(), ((TypePlaceholder) (resSet.resolveType(((TypePlaceholder) p.TA2)).resolvedType)).getName(), r);
if(!checkForDuplicates(mc, tempMC)) {
tempMC.add(mc);
}
}
}
}
@ -602,8 +608,9 @@ public class FamilyOfGeneratedGenerics {
r = Relation.EQUAL;
}
MethodConstraint mc = new MethodConstraint(ta1, ta2, r);
System.out.println(mc);
tempMC.add(mc);
if(!checkForDuplicates(mc, tempMC)) {
tempMC.add(mc);
}
}
return tempMC;