From a194bdbc9f25139772f27060b22b468bec61abb0 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Thu, 5 Oct 2017 18:23:28 +0200 Subject: [PATCH] =?UTF-8?q?Aufr=C3=A4umen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/de/dhbwstuttgart/core/JavaTXCompiler.java | 2 +- .../environment/CompilationEnvironment.java | 8 -------- src/de/dhbwstuttgart/environment/PackageCrawler.java | 10 ---------- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/de/dhbwstuttgart/core/JavaTXCompiler.java b/src/de/dhbwstuttgart/core/JavaTXCompiler.java index 5e466eae..6e7e6516 100644 --- a/src/de/dhbwstuttgart/core/JavaTXCompiler.java +++ b/src/de/dhbwstuttgart/core/JavaTXCompiler.java @@ -40,7 +40,7 @@ public class JavaTXCompiler { } public List typeInference(){ - List allClasses = environment.getAllAvailableClasses(); + List allClasses = new ArrayList<>();//environment.getAllAvailableClasses(); for(SourceFile sf : sourceFiles.values()){ allClasses.addAll(sf.getClasses()); } diff --git a/src/de/dhbwstuttgart/environment/CompilationEnvironment.java b/src/de/dhbwstuttgart/environment/CompilationEnvironment.java index 42671db7..46a60139 100644 --- a/src/de/dhbwstuttgart/environment/CompilationEnvironment.java +++ b/src/de/dhbwstuttgart/environment/CompilationEnvironment.java @@ -60,12 +60,4 @@ public class CompilationEnvironment { allNames = GatherNames.getNames(tree, new PackageCrawler(librarys)); return new JavaClassRegistry(allNames); } - - public List getAllAvailableClasses() { - List ret = new ArrayList<>(); - for(Class c : new PackageCrawler(librarys).getAllAvailableClasses()){ - ret.add(ASTFactory.createClass(c)); - } - return ret; - } } diff --git a/src/de/dhbwstuttgart/environment/PackageCrawler.java b/src/de/dhbwstuttgart/environment/PackageCrawler.java index 48c16502..e1e4b70c 100644 --- a/src/de/dhbwstuttgart/environment/PackageCrawler.java +++ b/src/de/dhbwstuttgart/environment/PackageCrawler.java @@ -54,16 +54,6 @@ public class PackageCrawler { return classes; } - public Set> getAllAvailableClasses(){ - Reflections reflections = new Reflections(new ConfigurationBuilder() - .setScanners(new SubTypesScanner(false /* don't exclude Object.class */), new ResourcesScanner()) - .setUrls(urls)); - - Set> classes = reflections.getSubTypesOf(Object.class); - - return classes; - } - public List getClassNames(String packageName){ List nameList = new ArrayList(); Set> classes = getClassesInPackage(packageName);