Fehler in get_ParaList behoben

This commit is contained in:
JanUlrich 2014-09-09 17:47:57 +02:00
parent 81d9d3ab64
commit 45ea59e7ad
3 changed files with 13 additions and 7 deletions

View File

@ -111,7 +111,7 @@ public class RefType extends Type implements IMatchable
super(offset);
// otth: Copy-Konstruktor
this.setName(R.getTypeName());
this.set_ParaList(R.get_ParaList());
this.set_ParaList(R.getParaList());
}
// ino.end
@ -332,15 +332,23 @@ public class RefType extends Type implements IMatchable
}
// ino.end
/**
* @return gibt bei leere Parameterliste null zurück. Ist entscheidend für unify-Algorithmus
*/
// ino.method.get_ParaList.26664.definition
public Vector<Type> get_ParaList()
// ino.end
// ino.method.get_ParaList.26664.body
{
return this.parameter;
if(this.parameter == null || this.parameter.size()==0)return null;
return this.parameter;
}
// ino.end
public Vector<Type> getParaList(){
return this.parameter;
}
// ino.method.add_Parameter.26667.definition
public void add_Parameter(Type o)
// ino.end
@ -737,9 +745,9 @@ public class RefType extends Type implements IMatchable
@Override
public JavaCodeResult printJavaCode(ResultSet resultSet) {
JavaCodeResult ret = new JavaCodeResult(this.name.toString());
if(this.get_ParaList()!=null && this.get_ParaList().size()>0){
if(this.getParaList()!=null && this.getParaList().size()>0){
ret .attach( "<" );
Iterator<Type> it = this.get_ParaList().iterator();
Iterator<Type> it = this.getParaList().iterator();
while(it.hasNext()){
Type t = it.next();
ret .attach( t.printJavaCode(resultSet));

View File

@ -301,7 +301,7 @@ public class TypeAssumptions {
if(match && t instanceof RefType){
RefType tr = (RefType)t;
RefType ret = ass.getAssumedClass().getType(); //Dadurch erhält der RefType den vollen Namen (bsp. java.lang.Integer)
ret.set_ParaList(tr.get_ParaList());
ret.set_ParaList(tr.getParaList());
return new ConstraintType(ret);
}
}

View File

@ -7,9 +7,7 @@ import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
import org.apache.log4j.Logger;
import de.dhbwstuttgart.core.MyCompiler;
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
import de.dhbwstuttgart.myexception.MatchException;