Bytecode-Generierung generiert jetzt wieder Bytecode für alle möglichen Typen.

This commit is contained in:
Michael Uhl 2019-04-27 16:29:38 +02:00
parent 481986e8ab
commit 11bee80969
2 changed files with 693 additions and 680 deletions

File diff suppressed because it is too large Load Diff

View File

@ -32,22 +32,34 @@ public class ResultSet {
if(type instanceof TypePlaceholder) if(type instanceof TypePlaceholder)
return new Resolver(this).resolve((TypePlaceholder)type); return new Resolver(this).resolve((TypePlaceholder)type);
if(type instanceof GenericRefType)return new ResolvedType(type, new HashSet<>()); if(type instanceof GenericRefType)return new ResolvedType(type, new HashSet<>());
if(type instanceof RefType){ if(type instanceof RefType) {
RelatedTypeWalker related = new RelatedTypeWalker(null, this); RelatedTypeWalker related = new RelatedTypeWalker(null, this);
type.accept(related); type.accept(related);
return new ResolvedType(type, related.relatedTPHs); return new ResolvedType(type, related.relatedTPHs);
}else{ } else {
throw new NotImplementedException(); throw new NotImplementedException();
//return new ResolvedType(type,new HashSet<>()); //return new ResolvedType(type,new HashSet<>());
} }
} }
//TODO Beim Einsetzen eines Generics, müssen die new und Methodenaufrufe verändert werden
public String toString() { public String toString() {
return results.toString(); return results.toString();
} }
@Override
public boolean equals(Object o) {
if (o instanceof ResultSet) {
ResultSet other = (ResultSet)o;
return this.results.equals(other.results);
} else {
return false;
}
}
@Override
public int hashCode() {
return results.hashCode();
}
} }
class Resolver implements ResultSetVisitor { class Resolver implements ResultSetVisitor {