Make NameResolver.getClassId extension instead of member

To get rid of dependency of NameResolver on ClassId
This commit is contained in:
Alexander Udalov
2018-03-01 13:27:53 +01:00
parent 27ad4f7d5d
commit e31f286444
23 changed files with 55 additions and 29 deletions
@@ -100,9 +100,14 @@ public final class ClassId {
*/
@NotNull
public static ClassId fromString(@NotNull String string) {
return fromString(string, false);
}
@NotNull
public static ClassId fromString(@NotNull String string, boolean isLocal) {
String packageName = StringsKt.substringBeforeLast(string, '/', "").replace('/', '.');
String className = StringsKt.substringAfterLast(string, '/', string);
return new ClassId(new FqName(packageName), new FqName(className), false);
return new ClassId(new FqName(packageName), new FqName(className), isLocal);
}
/**