Merge branch 'bigRefactoring' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore into plugin

This commit is contained in:
Andreas Stadelmeier 2018-01-31 16:43:04 +01:00
commit 5a3dcd7100
3 changed files with 5 additions and 1 deletions

View File

@ -72,7 +72,7 @@ public class GatherNames {
public static Map<String, Integer> getImports(Java8Parser.CompilationUnitContext ctx, PackageCrawler packages) throws ClassNotFoundException { public static Map<String, Integer> getImports(Java8Parser.CompilationUnitContext ctx, PackageCrawler packages) throws ClassNotFoundException {
Map<String, Integer> ret = new HashMap<>(); Map<String, Integer> ret = new HashMap<>();
ClassLoader classLoader = ClassLoader.getSystemClassLoader(); ClassLoader classLoader = ClassLoader.getSystemClassLoader();
ret.putAll(packages.getClassNames("java.lang")); //ret.putAll(packages.getClassNames("java.lang"));
for(Java8Parser.ImportDeclarationContext importDeclCtx : ctx.importDeclaration()){ for(Java8Parser.ImportDeclarationContext importDeclCtx : ctx.importDeclaration()){
if(importDeclCtx.singleTypeImportDeclaration() != null){ if(importDeclCtx.singleTypeImportDeclaration() != null){
Class cl = classLoader.loadClass(importDeclCtx.singleTypeImportDeclaration().typeName().getText()); Class cl = classLoader.loadClass(importDeclCtx.singleTypeImportDeclaration().typeName().getText());

View File

@ -1,3 +1,5 @@
import java.lang.Integer;
class LamAssign { class LamAssign {
m () { m () {

View File

@ -1,3 +1,5 @@
import java.lang.Integer;
class Faculty { class Faculty {
Integer mul(Integer x, Integer y) { Integer mul(Integer x, Integer y) {