Kleine Änderungen

This commit is contained in:
JanUlrich 2014-09-09 14:32:53 +02:00
parent 583dfb23e3
commit 330451271e
3 changed files with 12 additions and 5 deletions

View File

@ -54,7 +54,7 @@ public class JavaClassName {
if (obj == null) if (obj == null)
return false; return false;
if(obj instanceof String) if(obj instanceof String)
return this.toString().equals(obj) || this.name != null && this.name.equals(obj); //Auch mit Strings als Klassennamen kompatibel TODO: sollte bald obsolet sein return this.toString().equals(obj) || (this.name != null && this.name.equals(obj)); //Auch mit Strings als Klassennamen kompatibel TODO: sollte bald obsolet sein
if (getClass() != obj.getClass()) if (getClass() != obj.getClass())
return false; return false;
JavaClassName other = (JavaClassName) obj; JavaClassName other = (JavaClassName) obj;

View File

@ -6,8 +6,8 @@ import java.util.Enumeration;
import java.util.Hashtable; import java.util.Hashtable;
import java.util.Vector; import java.util.Vector;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.ClassFile;
import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.bytecode.CodeAttribute;
import de.dhbwstuttgart.core.MyCompiler; import de.dhbwstuttgart.core.MyCompiler;
@ -389,6 +389,13 @@ public class LocalVarDecl extends Statement implements TypeInsertable
return ret; return ret;
} }
@Override
public String getDescription() {
if(this.getType() == null)return "no type " + declid.toString();
if(this.getType() instanceof TypePlaceholder)return declid.toString();
return this.getType().toString() + " " + declid.toString();
}
@Override @Override
public void parserPostProcessing(SyntaxTreeNode parent) { public void parserPostProcessing(SyntaxTreeNode parent) {
super.parserPostProcessing(parent); super.parserPostProcessing(parent);

View File

@ -1840,8 +1840,8 @@ throws MatchException
//in ein Vector von Paaren um. //in ein Vector von Paaren um.
Vector<Pair> ret = new Vector<Pair>(); Vector<Pair> ret = new Vector<Pair>();
for(Enumeration e=ht.keys();e.hasMoreElements();) { for(Enumeration<JavaClassName> e=ht.keys();e.hasMoreElements();) {
String k = (String)e.nextElement(); String k = e.nextElement().toString();
// #JB# 11.04.2005 // #JB# 11.04.2005
// ########################################################### // ###########################################################
ret.addElement(new Pair(TypePlaceholder.backdoorCreate(k), (Type)ht.get(k), PairOperator.Equal)); ret.addElement(new Pair(TypePlaceholder.backdoorCreate(k), (Type)ht.get(k), PairOperator.Equal));