modified: src/main/java/de/dhbwstuttgart/bytecode/genericsGenerator/GeneratedGenericsFinder.java

modified:   src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java
This commit is contained in:
AluAli 2020-11-27 15:29:07 +01:00
parent 29a7f2e7fb
commit ed7cc55139
2 changed files with 19 additions and 2 deletions

View File

@ -135,7 +135,7 @@ public class GeneratedGenericsFinder implements ASTVisitor {
classOrInterface.accept(tphExtractor);
//PL 2020-10-16: Ab hier GGenerics implementieren durch Ali
//Rueckgabe an generatedGenericsForSF
// fogg = new FamilyOfGeneratedGenerics(tphExtractor);
fogg = new FamilyOfGeneratedGenerics(tphExtractor);
// fogg.getClassConstraints();
tphsClass = tphExtractor.tphsClass;

View File

@ -13,7 +13,7 @@ public class FamilyOfGeneratedGenerics {
public HashMap<String, PositionFinder.Position> posOfTPHs = new HashMap<>();
public FamilyOfGeneratedGenerics(TPHExtractor tphExtractor) {
this.allConstraints = tphExtractor.allCons;
// this.posOfTPHs = tphExtractor.
this.posOfTPHs = positionConverter(tphExtractor);
}
public static List<ClassConstraint> getClassConstraints(List<TPHConstraint> cs, HashMap<String, PositionFinder.Position> posOfTphs) { //Inputparameter List<TPHConstraint> constraintsSet weg
@ -232,6 +232,23 @@ public class FamilyOfGeneratedGenerics {
}
public HashMap<String, PositionFinder.Position> positionConverter(TPHExtractor tphExtractor) {
HashMap<String, PositionFinder.Position> convertedPositions = new HashMap<>();
for(String tph: tphExtractor.allTPHS.keySet()) {
if(tphExtractor.allTPHS.get(tph)) {
convertedPositions.put(tph, PositionFinder.Position.METHOD);
} else {
convertedPositions.put(tph, PositionFinder.Position.FIELD);
}
}
return convertedPositions;
}
/* public PositionFinder.Position positionConverter(TPHExtractor tphExtractor) {
if(tphExtractor.allTPHS.keySet())
}*/