type-algo args angepasst, Class statt Sourcefile

This commit is contained in:
sebastian 2017-03-15 21:39:41 +01:00
parent 593bb74b12
commit e115430874
2 changed files with 12 additions and 11 deletions

View File

@ -16,15 +16,15 @@ public class Type {
private List<TC_Abstract> result_constraint_set;
public Type(List<AS_Abstract> ass, SourceFile sf) {
public Type(List<AS_Abstract> ass, ClassOrInterface cl) {
this.result_constraint_set = new ArrayList<TC_Abstract>();
// =:fass
List<AS_Field> fass = make_field_assumptions(sf);
List<AS_Field> fass = make_field_assumptions(cl);
// =: mass
List<AS_Method> mass = make_method_assumptions(sf);
List<AS_Method> mass = make_method_assumptions(cl);
// -> AssAll = ass + fass + mass
List<AS_Abstract> assAll = new ArrayList<AS_Abstract>();
@ -56,30 +56,29 @@ public class Type {
// fass
private List<AS_Field> make_field_assumptions(SourceFile sf) {
private List<AS_Field> make_field_assumptions(ClassOrInterface cl) {
List<AS_Field> fass = new ArrayList<AS_Field>();
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<AS_Method> make_method_assumptions(SourceFile sf) {
private List<AS_Method> make_method_assumptions(ClassOrInterface cl) {
List<AS_Method> mass = new ArrayList<AS_Method>();
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;
}

View File

@ -53,7 +53,9 @@ public class GeneralParserTest{
SourceFile sfdebug = sf;
List<AS_Abstract> ass = new ArrayList<AS_Abstract>();
Type type = new Type( ass , sf);
Type type = new Type( ass , sf.KlassenVektor.get(0));