diff --git a/src/de/dhbwstuttgart/strucTypes/Type.java b/src/de/dhbwstuttgart/strucTypes/Type.java index c4c12dd8..6db69620 100644 --- a/src/de/dhbwstuttgart/strucTypes/Type.java +++ b/src/de/dhbwstuttgart/strucTypes/Type.java @@ -16,15 +16,15 @@ public class Type { private List result_constraint_set; - public Type(List ass, SourceFile sf) { + public Type(List ass, ClassOrInterface cl) { this.result_constraint_set = new ArrayList(); // =:fass - List fass = make_field_assumptions(sf); + List fass = make_field_assumptions(cl); // =: mass - List mass = make_method_assumptions(sf); + List mass = make_method_assumptions(cl); // -> AssAll = ass + fass + mass List assAll = new ArrayList(); @@ -56,30 +56,29 @@ public class Type { // fass - private List make_field_assumptions(SourceFile sf) { + private List make_field_assumptions(ClassOrInterface cl) { List fass = new ArrayList(); - for (ClassOrInterface cl : sf.KlassenVektor ) { + for (Field f : cl.getFieldDecl() ) { AS_Field as_f = new AS_Field(cl, f) ; fass.add(as_f); } - } + return fass; } // mass - private List make_method_assumptions(SourceFile sf) { + private List make_method_assumptions(ClassOrInterface cl) { List mass = new ArrayList(); - - for(ClassOrInterface cl : sf.KlassenVektor) { + for(Method m : cl.getMethods() ) { AS_Method as_m = new AS_Method(cl,m); mass.add(as_m); } - } + return mass; } diff --git a/test/strucTypes/GeneralParserTest.java b/test/strucTypes/GeneralParserTest.java index b8603254..8f5ea68b 100644 --- a/test/strucTypes/GeneralParserTest.java +++ b/test/strucTypes/GeneralParserTest.java @@ -53,7 +53,9 @@ public class GeneralParserTest{ SourceFile sfdebug = sf; List ass = new ArrayList(); - Type type = new Type( ass , sf); + Type type = new Type( ass , sf.KlassenVektor.get(0)); + +