forked from JavaTX/JavaCompilerCore
modified: src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/ClassConstraint.java
modified: src/main/java/de/dhbwstuttgart/bytecode/gGenericsAli/FamilyOfGeneratedGenerics.java
This commit is contained in:
parent
c86fe95da5
commit
0ecd3916f8
@ -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;
|
||||
}*/
|
||||
}
|
||||
|
@ -47,14 +47,10 @@ public class FamilyOfGeneratedGenerics {
|
||||
public List<ClassConstraint> typeOfANodeOfAField(List<TPHConstraint> 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<ClassConstraint> transitiveSubtypeForClassTypes(List<TPHConstraint> allConstraints, List<ClassConstraint> 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;
|
||||
|
Loading…
Reference in New Issue
Block a user