Bytecode-Generierung generiert jetzt wieder Bytecode für alle möglichen Typen.
This commit is contained in:
parent
481986e8ab
commit
11bee80969
@ -1,6 +1,7 @@
|
||||
package de.dhbwstuttgart.bytecode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@ -53,7 +54,7 @@ public class BytecodeGen implements ASTVisitor {
|
||||
public static RefTypeOrTPHOrWildcardOrGeneric THISTYPE = null;
|
||||
String className;
|
||||
private boolean isInterface;
|
||||
private List<ResultSet> listOfResultSets;
|
||||
private Collection<ResultSet> listOfResultSets;
|
||||
private ResultSet resultSet;
|
||||
private SourceFile sf;
|
||||
private String path;
|
||||
@ -93,7 +94,7 @@ public class BytecodeGen implements ASTVisitor {
|
||||
this.simplifyResultsList = simplifyResultsList;
|
||||
}
|
||||
|
||||
public BytecodeGen(HashMap<String,byte[]> classFiles, List<ResultSet> listOfResultSets,SourceFile sf ,String path) {
|
||||
public BytecodeGen(HashMap<String,byte[]> classFiles, Collection<ResultSet> listOfResultSets,SourceFile sf ,String path) {
|
||||
this.classFiles = classFiles;
|
||||
this.listOfResultSets = listOfResultSets;
|
||||
this.sf = sf;
|
||||
|
@ -42,12 +42,24 @@ public class ResultSet {
|
||||
}
|
||||
}
|
||||
|
||||
//TODO Beim Einsetzen eines Generics, müssen die new und Methodenaufrufe verändert werden
|
||||
|
||||
public String 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user