modified: src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java
This commit is contained in:
parent
080eb2f6f3
commit
af223a4d8a
@ -814,14 +814,17 @@ public class FamilyOfGeneratedGenerics {
|
||||
|
||||
|
||||
|
||||
public static List<MethodConstraint> methodTypesWithoutClassTypesNEW(String tphToCompute, List<MethodConstraint> cs_m, HashMap<String, List<PairTphMethod<PositionFinder.Position, String>>> posOfTphs) {
|
||||
public static List<MethodConstraint> methodTypesWithoutClassTypesNEW(List<String> tphsToCompute, List<MethodConstraint> cs_m, HashMap<String, List<PairTphMethod<PositionFinder.Position, String>>> posOfTphs) {
|
||||
List<MethodConstraint> tempMC = new ArrayList<>(cs_m);
|
||||
List<MethodConstraint> tempMC2 = new ArrayList<>(cs_m);
|
||||
for(TPHConstraint tphCons: tempMC) {
|
||||
if(tphCons.getLeft() == tphToCompute) {
|
||||
String newRightTPH = tphCons.getRight();
|
||||
tempMC2.remove(tphCons);
|
||||
tempMC2 = methodTypesWithoutClassTypesNEW(newRightTPH,tempMC2,posOfTphs);
|
||||
List<String> toRemove = new ArrayList<>();
|
||||
for(String tph: tphsToCompute) {
|
||||
for(TPHConstraint tphCons: tempMC) {
|
||||
if(tphCons.getLeft() == tph) {
|
||||
toRemove.add(tphCons.getRight());
|
||||
tempMC2.remove(tphCons);
|
||||
tempMC2 = methodTypesWithoutClassTypesNEW(toRemove,tempMC2,posOfTphs);
|
||||
}
|
||||
}
|
||||
}
|
||||
return tempMC2;
|
||||
@ -875,10 +878,12 @@ public class FamilyOfGeneratedGenerics {
|
||||
}
|
||||
|
||||
mcWithoutCc = listToAdd;
|
||||
List<String> tphs = new ArrayList<>();
|
||||
for(String tph: posOfTphs.keySet()) {
|
||||
for (PairTphMethod p : posOfTphs.get(tph)) {
|
||||
if(p.fst == PositionFinder.Position.FIELD) {
|
||||
mcWithoutCc = methodTypesWithoutClassTypesNEW(tph, listToAdd, posOfTphs);
|
||||
tphs.add(tph);
|
||||
mcWithoutCc = methodTypesWithoutClassTypesNEW(tphs, listToAdd, posOfTphs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user