forked from JavaTX/JavaCompilerCore
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> tempMC = new ArrayList<>(cs_m);
|
||||||
List<MethodConstraint> tempMC2 = new ArrayList<>(cs_m);
|
List<MethodConstraint> tempMC2 = new ArrayList<>(cs_m);
|
||||||
|
List<String> toRemove = new ArrayList<>();
|
||||||
|
for(String tph: tphsToCompute) {
|
||||||
for(TPHConstraint tphCons: tempMC) {
|
for(TPHConstraint tphCons: tempMC) {
|
||||||
if(tphCons.getLeft() == tphToCompute) {
|
if(tphCons.getLeft() == tph) {
|
||||||
String newRightTPH = tphCons.getRight();
|
toRemove.add(tphCons.getRight());
|
||||||
tempMC2.remove(tphCons);
|
tempMC2.remove(tphCons);
|
||||||
tempMC2 = methodTypesWithoutClassTypesNEW(newRightTPH,tempMC2,posOfTphs);
|
tempMC2 = methodTypesWithoutClassTypesNEW(toRemove,tempMC2,posOfTphs);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tempMC2;
|
return tempMC2;
|
||||||
@ -875,10 +878,12 @@ public class FamilyOfGeneratedGenerics {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mcWithoutCc = listToAdd;
|
mcWithoutCc = listToAdd;
|
||||||
|
List<String> tphs = new ArrayList<>();
|
||||||
for(String tph: posOfTphs.keySet()) {
|
for(String tph: posOfTphs.keySet()) {
|
||||||
for (PairTphMethod p : posOfTphs.get(tph)) {
|
for (PairTphMethod p : posOfTphs.get(tph)) {
|
||||||
if(p.fst == PositionFinder.Position.FIELD) {
|
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