Remove some unused methods from QualifiedNamesUtil
This commit is contained in:
@@ -37,11 +37,6 @@ public final class QualifiedNamesUtil {
|
||||
(subpackageName.getFqName().startsWith(packageName.getFqName()) && subpackageName.getFqName().charAt(packageName.getFqName().length()) == '.');
|
||||
}
|
||||
|
||||
public static boolean isShortNameForFQN(@NotNull final String name, @NotNull final FqName fqn) {
|
||||
return fqn.getFqName().equals(name) ||
|
||||
(fqn.getFqName().endsWith(name) && fqn.getFqName().charAt(fqn.getFqName().length() - name.length() - 1) == '.');
|
||||
}
|
||||
|
||||
public static boolean isOneSegmentFQN(@NotNull final String fqn) {
|
||||
if (fqn.isEmpty()) {
|
||||
return false;
|
||||
@@ -54,16 +49,6 @@ public final class QualifiedNamesUtil {
|
||||
return isOneSegmentFQN(fqn.getFqName());
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Name fqnToShortName(@NotNull FqName fqn) {
|
||||
return getLastSegment(fqn);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Name getLastSegment(@NotNull FqName fqn) {
|
||||
return fqn.shortName();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static String getFirstSegment(@NotNull String fqn) {
|
||||
int dotIndex = fqn.indexOf('.');
|
||||
|
||||
@@ -51,7 +51,6 @@ import org.jetbrains.jet.lang.resolve.java.JetFilesProvider;
|
||||
import org.jetbrains.jet.lang.resolve.java.JetJavaMirrorMarker;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
import org.jetbrains.jet.plugin.JetLanguage;
|
||||
import org.jetbrains.jet.util.QualifiedNamesUtil;
|
||||
import org.jetbrains.jet.utils.Progress;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -74,7 +73,7 @@ public class JetLightClass extends AbstractLightClass implements JetJavaMirrorMa
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return QualifiedNamesUtil.fqnToShortName(qualifiedName).getName();
|
||||
return qualifiedName.shortName().getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -137,7 +137,7 @@ class JetFromJavaDescriptorHelper {
|
||||
FqName classFQN = new FqName(containingClass.getQualifiedName());
|
||||
|
||||
if (classFQN != null) {
|
||||
if (QualifiedNamesUtil.fqnToShortName(classFQN).getName().equals(JvmAbi.PACKAGE_CLASS)) {
|
||||
if (classFQN.shortName().toString().equals(JvmAbi.PACKAGE_CLASS)) {
|
||||
FqName classParentFQN = QualifiedNamesUtil.withoutLastSegment(classFQN);
|
||||
return QualifiedNamesUtil.combine(classParentFQN, Name.identifier(method.getName()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user