Fehler in WildcardType.printJavaCode behoben

This commit is contained in:
JanUlrich 2014-09-02 18:55:54 +02:00
parent 37d33b7a31
commit 3232201843
3 changed files with 11 additions and 6 deletions

View File

@ -1,5 +1,8 @@
package de.dhbwstuttgart.syntaxtree.type;
import de.dhbwstuttgart.typeinference.JavaCodeResult;
import de.dhbwstuttgart.typeinference.ResultSet;
/**
* Stellt eine Wildcard mit oberer Grenze dar.
@ -121,4 +124,10 @@ public class ExtendsWildcardType extends WildcardType implements ITypeContainer,
{
return this.get_ExtendsType();
}
@Override
public JavaCodeResult printJavaCode(ResultSet resultSet) {
return new JavaCodeResult("? extends "+this.extendsType.printJavaCode(resultSet));
}
}

View File

@ -126,7 +126,7 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I
@Override
public JavaCodeResult printJavaCode(ResultSet result){
return new JavaCodeResult("? super " + this.superType.printJavaCode(resultSet));
return new JavaCodeResult("? super " + this.superType.printJavaCode(result));
}
}

View File

@ -89,10 +89,6 @@ public class WildcardType extends Type{
@Override
public JavaCodeResult printJavaCode(ResultSet resultSet) {
//String ret = "? extends ";
//ret+=this.extendsType;
//TODO hier wird statt "? extends class" nur "class" ausgegeben
return new JavaCodeResult(this.toString());
throw new NotImplementedException();
}
}