Make NameResolver.getClassId extension instead of member
To get rid of dependency of NameResolver on ClassId
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user