Aufräumen

This commit is contained in:
JanUlrich 2017-10-05 18:23:28 +02:00
parent e341d9075e
commit a194bdbc9f
3 changed files with 1 additions and 19 deletions

View File

@ -40,7 +40,7 @@ public class JavaTXCompiler {
}
public List<ResultSet> typeInference(){
List<ClassOrInterface> allClasses = environment.getAllAvailableClasses();
List<ClassOrInterface> allClasses = new ArrayList<>();//environment.getAllAvailableClasses();
for(SourceFile sf : sourceFiles.values()){
allClasses.addAll(sf.getClasses());
}

View File

@ -60,12 +60,4 @@ public class CompilationEnvironment {
allNames = GatherNames.getNames(tree, new PackageCrawler(librarys));
return new JavaClassRegistry(allNames);
}
public List<ClassOrInterface> getAllAvailableClasses() {
List<ClassOrInterface> ret = new ArrayList<>();
for(Class c : new PackageCrawler(librarys).getAllAvailableClasses()){
ret.add(ASTFactory.createClass(c));
}
return ret;
}
}

View File

@ -54,16 +54,6 @@ public class PackageCrawler {
return classes;
}
public Set<Class<?>> getAllAvailableClasses(){
Reflections reflections = new Reflections(new ConfigurationBuilder()
.setScanners(new SubTypesScanner(false /* don't exclude Object.class */), new ResourcesScanner())
.setUrls(urls));
Set<Class<?>> classes = reflections.getSubTypesOf(Object.class);
return classes;
}
public List<String> getClassNames(String packageName){
List<String> nameList = new ArrayList();
Set<Class<?>> classes = getClassesInPackage(packageName);