Minor refactoring in TypeUtils
Move out unneeded things in runtime, fix warnings
This commit is contained in:
+15
-1
@@ -67,6 +67,20 @@ public class TypeReconstructionUtil {
|
||||
assert declarationDescriptor != null : "No declaration descriptor for type constructor " + constructor;
|
||||
String name = declarationDescriptor.getName().asString();
|
||||
|
||||
return TypeUtils.getTypeNameAndStarProjectionsString(name, size);
|
||||
return getTypeNameAndStarProjectionsString(name, size);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String getTypeNameAndStarProjectionsString(@NotNull String name, int size) {
|
||||
StringBuilder builder = new StringBuilder(name);
|
||||
builder.append("<");
|
||||
for (int i = 0; i < size; i++) {
|
||||
builder.append("*");
|
||||
if (i == size - 1) break;
|
||||
builder.append(", ");
|
||||
}
|
||||
builder.append(">");
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user