Fehler in JavaClassRegistry.contains fixen

This commit is contained in:
JanUlrich 2017-03-22 17:10:51 +01:00
parent c480e25805
commit 56e4192df4
2 changed files with 2 additions and 17 deletions

View File

@ -199,7 +199,7 @@ public class SyntaxTreeGenerator{
modifiers += newModifier;
}
}
JavaClassName name = convert(ctx.Identifier());
JavaClassName name = reg.getName(ctx.Identifier().getText());
GenericDeclarationList genericClassParameters = TypeGenerator.convert(ctx.typeParameters(), reg, generics);
Block class_block = null;
List<Field> fielddecl = convertFields(ctx.classBody());
@ -324,21 +324,6 @@ public class SyntaxTreeGenerator{
return convertModifier(ctx.getText());
}
/**
Converts a TerminalNode to JavaClassName. If pkgName is set, it will be included like expected.
**/
private JavaClassName convert(TerminalNode t){
String name = "";
if(this.pkgName != null){
name = this.pkgName + "." + t.toString();
}
else{
name = t.toString();
}
return this.reg.getName(name);
}
private ClassOrInterface convertEnum(Java8Parser.EnumDeclarationContext ctx){
return null;
}

View File

@ -32,6 +32,6 @@ public class JavaClassRegistry {
}
public boolean contains(String whole) {
return existingClasses.contains(whole);
return existingClasses.contains(new JavaClassName(whole));
}
}