From e83d59d97d3d1cbda70544b50cb1a70a3642e744 Mon Sep 17 00:00:00 2001 From: Michael Uhl Date: Thu, 24 Jan 2019 11:16:26 +0100 Subject: [PATCH] =?UTF-8?q?Observer=20Pattern=20f=C3=BCr=20ResultSet.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java | 7 +++++++ .../typeinference/unify/UnifyResultEvent.java | 8 +++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java index f339af1a..d7915f3f 100644 --- a/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java +++ b/src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java @@ -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 typeInference() throws ClassNotFoundException { List allClasses = new ArrayList<>();//environment.getAllAvailableClasses(); diff --git a/src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyResultEvent.java b/src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyResultEvent.java index 05433287..a79e34ec 100644 --- a/src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyResultEvent.java +++ b/src/main/java/de/dhbwstuttgart/typeinference/unify/UnifyResultEvent.java @@ -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 newTypeResult; - public UnifyResultEvent(ResultSet newTypeResult) { + public UnifyResultEvent(List newTypeResult) { this.newTypeResult = newTypeResult; } - public ResultSet getNewTypeResult() { + public List getNewTypeResult() { return newTypeResult; } }