Aufräumen
This commit is contained in:
parent
e341d9075e
commit
a194bdbc9f
@ -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());
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user