From 0ecd3916f8303a3aa2d4753d90db51b5aa90d186 Mon Sep 17 00:00:00 2001 From: AluAli Date: Fri, 30 Oct 2020 09:41:09 +0100 Subject: [PATCH] modified: src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/ClassConstraint.java modified: src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java --- .../bytecode/gGenericsAli/ClassConstraint.java | 6 ++++++ .../bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java | 9 +++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/ClassConstraint.java b/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/ClassConstraint.java index 13387548..7f86e935 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/ClassConstraint.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/ClassConstraint.java @@ -3,7 +3,13 @@ package de.dhbwstuttgart.bytecode.gGenericsAli; import de.dhbwstuttgart.bytecode.constraint.TPHConstraint; public class ClassConstraint extends TPHConstraint { + private TPHConstraint constraint; + public ClassConstraint(String left, String right, Relation rel) { super(left, right, rel); } + //besser? + /*public ClassConstraint(TPHConstraint constraint) { + this.constraint = constraint; + }*/ } diff --git a/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java b/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java index ece7b32f..d14c18b2 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java @@ -47,14 +47,10 @@ public class FamilyOfGeneratedGenerics { public List typeOfANodeOfAField(List cs) { //TODO: for(TPHConstraint cons: cs){ - System.out.println(cons); - System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); if(cons.getRight()!=null && cons.getRel()==Relation.EXTENDS) { cs_cl.add(new ClassConstraint(cons.getLeft(), cons.getRight(),cons.getRel())); } } - System.out.println(cs_cl); - System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); return cs_cl; } @@ -65,11 +61,12 @@ public class FamilyOfGeneratedGenerics { public List transitiveSubtypeForClassTypes(List allConstraints, List classConstraints) { //TODO: for(ClassConstraint cCons: classConstraints) { - for(TPHConstraint allCons: allConstraints) + for(TPHConstraint allCons: allConstraints) { // if(tphExtractor.containsConstraint(allConstraints, cCons)) { // } - if(cCons.getRight() == allCons.getLeft()){ + if(cCons.getRight() == allCons.getLeft()){ + } } } return cs_cl;