modified: src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java
modified: src/test/java/insertGenerics/FamilyOfGeneratedGenericsTest.java
This commit is contained in:
parent
9cf7cec37b
commit
a4bc49f5c4
@ -55,7 +55,7 @@ public class FamilyOfGeneratedGenerics {
|
|||||||
if(posOfTphs.containsKey(allCons.getLeft()) && allCons.getRight()!=null && allCons.getRel()==Relation.EXTENDS) {
|
if(posOfTphs.containsKey(allCons.getLeft()) && allCons.getRight()!=null && allCons.getRel()==Relation.EXTENDS) {
|
||||||
for(String tph: posOfTphs.keySet()) {
|
for(String tph: posOfTphs.keySet()) {
|
||||||
if(tph == allCons.getLeft() && posOfTphs.get(tph) == PositionFinder.Position.FIELD) {
|
if(tph == allCons.getLeft() && posOfTphs.get(tph) == PositionFinder.Position.FIELD) {
|
||||||
ClassConstraint consToAdd = new ClassConstraint(allCons.getLeft(), allCons.getRight(), allCons.getRel());
|
ClassConstraint consToAdd = new ClassConstraint(tph, allCons.getRight(), allCons.getRel());
|
||||||
if (!checkForDuplicates(consToAdd, tempCC)) {
|
if (!checkForDuplicates(consToAdd, tempCC)) {
|
||||||
tempCC.add(consToAdd);
|
tempCC.add(consToAdd);
|
||||||
}
|
}
|
||||||
|
@ -54,8 +54,8 @@ public class FamilyOfGeneratedGenericsTest extends TestCase {
|
|||||||
inputConstraints.add(new TPHConstraint("A", "B", TPHConstraint.Relation.EXTENDS));
|
inputConstraints.add(new TPHConstraint("A", "B", TPHConstraint.Relation.EXTENDS));
|
||||||
|
|
||||||
HashMap<String, PositionFinder.Position> tphPositions = new HashMap<>();
|
HashMap<String, PositionFinder.Position> tphPositions = new HashMap<>();
|
||||||
tphPositions.put("A", PositionFinder.Position.METHOD);
|
tphPositions.put("A", PositionFinder.Position.FIELD);
|
||||||
tphPositions.put("B", PositionFinder.Position.FIELD);
|
tphPositions.put("B", PositionFinder.Position.METHOD);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ClassConstraints should be the same as the input constraint
|
ClassConstraints should be the same as the input constraint
|
||||||
|
Loading…
Reference in New Issue
Block a user