Observer Pattern für ResultSet.

This commit is contained in:
Michael Uhl 2019-01-24 11:16:26 +01:00
parent 3ad51f952e
commit e83d59d97d
2 changed files with 12 additions and 3 deletions

View File

@ -33,6 +33,7 @@ import de.dhbwstuttgart.typeinference.unify.model.PlaceholderType;
import de.dhbwstuttgart.typeinference.unify.model.UnifyPair;
import de.dhbwstuttgart.typeinference.unify.model.UnifyType;
import de.dhbwstuttgart.typeinference.unify.TypeUnifyTask;
import de.dhbwstuttgart.typeinference.unify.UnifyResultModel;
import java.io.File;
import java.io.FileOutputStream;
@ -43,6 +44,8 @@ import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.antlr.v4.parse.ANTLRParser.throwsSpec_return;
public class JavaTXCompiler {
final CompilationEnvironment environment;
@ -268,6 +271,10 @@ public class JavaTXCompiler {
}
*/
public UnifyResultModel typeInferenceAsync() throws ClassNotFoundException {
return new UnifyResultModel();
}
public List<ResultSet> typeInference() throws ClassNotFoundException {
List<ClassOrInterface> allClasses = new ArrayList<>();//environment.getAllAvailableClasses();

View File

@ -1,16 +1,18 @@
package de.dhbwstuttgart.typeinference.unify;
import java.util.List;
import de.dhbwstuttgart.typeinference.result.ResultSet;
public class UnifyResultEvent {
private ResultSet newTypeResult;
private List<ResultSet> newTypeResult;
public UnifyResultEvent(ResultSet newTypeResult) {
public UnifyResultEvent(List<ResultSet> newTypeResult) {
this.newTypeResult = newTypeResult;
}
public ResultSet getNewTypeResult() {
public List<ResultSet> getNewTypeResult() {
return newTypeResult;
}
}