forked from JavaTX/JavaCompilerCore
Aufräumen
This commit is contained in:
parent
d03e20df90
commit
46f1134bad
@ -68,7 +68,7 @@ public class ClassGenerator extends ClassGen{
|
||||
//return getNearestType((TypePlaceholder) t);
|
||||
return new TypePlaceholderType((TypePlaceholder) t);
|
||||
}else{
|
||||
return t.getBytecodeType(this, getTypeinferenceResults().getTypeReconstructions().firstElement());
|
||||
return t.getBytecodeType(this, getTypeinferenceResults().getTypeReconstructions().get(0));
|
||||
}
|
||||
}
|
||||
public org.apache.commons.bcel6.generic.Type getNearestUsedType(TypePlaceholder toTPH){
|
||||
@ -150,7 +150,7 @@ public class ClassGenerator extends ClassGen{
|
||||
TypePlaceholder tph = it.next();
|
||||
//ret += tph.getBytecodeMethodSignature(this);
|
||||
//ret += ":";
|
||||
ret += tph.getClassSignature(this, getTypeinferenceResults().getTypeReconstructions().firstElement());
|
||||
ret += tph.getClassSignature(this, getTypeinferenceResults().getTypeReconstructions().get(0));
|
||||
}
|
||||
ret += ">";
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ public class Class extends GTVDeclarationContext implements AClassOrInterface, I
|
||||
}
|
||||
InstructionList fieldInitializations = new InstructionList();
|
||||
for(FieldDeclaration f : fieldDeclarations){
|
||||
fieldInitializations.append(f.genByteCode(_cg, typeinferenceResults.getTypeReconstructions().firstElement()));
|
||||
fieldInitializations.append(f.genByteCode(_cg, typeinferenceResults.getTypeReconstructions().get(0)));
|
||||
}
|
||||
//Die Konstruktoren müssen die Feld initialisierungswerte beinhalten:
|
||||
for(Constructor c : constructors){
|
||||
|
@ -71,19 +71,6 @@ public class ConstraintsSet extends UndMenge<Pair> implements Iterable<OderConst
|
||||
});
|
||||
}
|
||||
*/
|
||||
/**
|
||||
* Aus dem ConstraintsSet [ u1, u2, ... (OderConstraint), ... uN ] werden alle
|
||||
* UndConstraints, welche sich nicht innerhalb eines OderConstraints befinden, herausgefiltert
|
||||
* @return [u1, ... , uN]
|
||||
*/
|
||||
private Vector<UndConstraint> filterUndConstraints() {
|
||||
Vector<UndConstraint> ret = new Vector<>();
|
||||
for(OderConstraint con : constraintsSet){
|
||||
UndConstraint filtered = con.filterUndConstraints();
|
||||
if(filtered != null)ret.add(filtered);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void add(UndConstraint singleConstraint) {
|
||||
OderConstraint toAdd = new OderConstraint();
|
||||
|
@ -1,5 +1,7 @@
|
||||
package de.dhbwstuttgart.typeinference;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import de.dhbwstuttgart.bytecode.ClassGenerator;
|
||||
import de.dhbwstuttgart.logger.Logger;
|
||||
import de.dhbwstuttgart.logger.Section;
|
||||
@ -9,21 +11,21 @@ import de.dhbwstuttgart.syntaxtree.type.SuperWildcardType;
|
||||
|
||||
public class TypeinferenceResults {
|
||||
|
||||
private Menge<TypeinferenceResultSet> typeReconstructions;
|
||||
private List<TypeinferenceResultSet> typeReconstructions;
|
||||
|
||||
public TypeinferenceResults() {
|
||||
typeReconstructions = new Menge<>();
|
||||
}
|
||||
|
||||
public TypeinferenceResults(Menge<TypeinferenceResultSet> typeReconstructions) {
|
||||
public TypeinferenceResults(List<TypeinferenceResultSet> typeReconstructions) {
|
||||
this.typeReconstructions = typeReconstructions;
|
||||
}
|
||||
|
||||
public Menge<TypeinferenceResultSet> getTypeReconstructions() {
|
||||
public List<TypeinferenceResultSet> getTypeReconstructions() {
|
||||
return typeReconstructions;
|
||||
}
|
||||
|
||||
public Menge<TypeinferenceResultSet> getTypeReconstructions(Method method, ClassGenerator cg) {
|
||||
public List<TypeinferenceResultSet> getTypeReconstructions(Method method, ClassGenerator cg) {
|
||||
return typeReconstructions;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user