Minor. Renamed method.

This commit is contained in:
Evgeny Gerashchenko
2013-12-04 17:46:58 +04:00
parent e175ebf60a
commit 3352d8a954
49 changed files with 80 additions and 83 deletions
@@ -111,7 +111,7 @@ public class TypeParameterDescriptorImpl extends DeclarationDescriptorNonRootImp
}
private String nameForAssertions() {
return getName() + " declared in " + DescriptorUtils.getFQName(getContainingDeclaration());
return getName() + " declared in " + DescriptorUtils.getFqName(getContainingDeclaration());
}
public void setInitialized() {
@@ -109,7 +109,7 @@ public class DescriptorUtils {
}
@NotNull
public static FqNameUnsafe getFQName(@NotNull DeclarationDescriptor descriptor) {
public static FqNameUnsafe getFqName(@NotNull DeclarationDescriptor descriptor) {
DeclarationDescriptor containingDeclaration = descriptor.getContainingDeclaration();
if (descriptor instanceof ModuleDescriptor || ErrorUtils.isError(descriptor)) {
@@ -126,10 +126,10 @@ public class DescriptorUtils {
if (containingDeclaration instanceof ClassDescriptor && ((ClassDescriptor) containingDeclaration).getKind() == ClassKind.CLASS_OBJECT) {
DeclarationDescriptor classOfClassObject = containingDeclaration.getContainingDeclaration();
assert classOfClassObject != null;
return getFQName(classOfClassObject).child(descriptor.getName());
return getFqName(classOfClassObject).child(descriptor.getName());
}
return getFQName(containingDeclaration).child(descriptor.getName());
return getFqName(containingDeclaration).child(descriptor.getName());
}
public static boolean isTopLevelDeclaration(@NotNull DeclarationDescriptor descriptor) {
@@ -21,7 +21,7 @@ import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor
public fun ClassDescriptor.checkSuperTypeByFQName(qualifiedName: String, deep: Boolean): Boolean {
fun checkDescriptor(descriptor: DeclarationDescriptor): Boolean {
return qualifiedName == DescriptorUtils.getFQName(descriptor).asString()
return qualifiedName == DescriptorUtils.getFqName(descriptor).asString()
}
if (deep && checkDescriptor(this)) return true
@@ -30,8 +30,8 @@ public interface RedeclarationHandler {
@Override
public void handleRedeclaration(@NotNull DeclarationDescriptor first, @NotNull DeclarationDescriptor second) {
throw new IllegalStateException(
String.format("Redeclaration: %s (%s) and %s (%s) (no line info available)", DescriptorUtils.getFQName(first), first,
DescriptorUtils.getFQName(second), second)
String.format("Redeclaration: %s (%s) and %s (%s) (no line info available)", DescriptorUtils.getFqName(first), first,
DescriptorUtils.getFqName(second), second)
);
}
};
@@ -197,7 +197,7 @@ public class DescriptorRendererImpl implements DescriptorRenderer {
Collections.reverse(qualifiedNameElements);
return renderFqName(qualifiedNameElements);
}
return renderFqName(DescriptorUtils.getFQName(klass));
return renderFqName(DescriptorUtils.getFqName(klass));
}
/* TYPES RENDERING */
@@ -299,7 +299,7 @@ public class DescriptorRendererImpl implements DescriptorRenderer {
DeclarationDescriptor containingDeclaration = descriptor.getContainingDeclaration();
if (containingDeclaration != null) {
FqNameUnsafe fqName = DescriptorUtils.getFQName(containingDeclaration);
FqNameUnsafe fqName = DescriptorUtils.getFqName(containingDeclaration);
builder.append(FqName.ROOT.equalsTo(fqName) ? "root package" : renderFqName(fqName));
}
}
@@ -310,7 +310,7 @@ public class DescriptorRendererImpl implements DescriptorRenderer {
ClassDescriptor annotationClass = (ClassDescriptor) annotation.getType().getConstructor().getDeclarationDescriptor();
assert annotationClass != null;
if (!excludedAnnotationClasses.contains(DescriptorUtils.getFQName(annotationClass).toSafe())) {
if (!excludedAnnotationClasses.contains(DescriptorUtils.getFqName(annotationClass).toSafe())) {
builder.append(renderType(annotation.getType()));
if (verbose) {
builder.append("(").append(StringUtil.join(DescriptorUtils.getSortedValueArguments(annotation, this), ", ")).append(")");