Minor. Renamed method.
This commit is contained in:
@@ -27,7 +27,7 @@ import org.jetbrains.jet.lang.resolve.name.Name;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.getFQName;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.getFqName;
|
||||
|
||||
/**
|
||||
* Provides a mechanism to bind some of the kotlin/java declations with library implementations.
|
||||
@@ -153,12 +153,12 @@ public final class StandardClasses {
|
||||
}
|
||||
|
||||
public boolean isStandardObject(@NotNull DeclarationDescriptor descriptor) {
|
||||
return standardObjects.containsKey(getFQName(descriptor));
|
||||
return standardObjects.containsKey(getFqName(descriptor));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public JsName getStandardObjectName(@NotNull DeclarationDescriptor descriptor) {
|
||||
return standardObjects.get(getFQName(descriptor));
|
||||
return standardObjects.get(getFqName(descriptor));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ public final class PatternBuilder {
|
||||
}
|
||||
|
||||
private boolean doApply(@NotNull FunctionDescriptor descriptor) {
|
||||
List<Name> nameParts = DescriptorUtils.getFQName(descriptor).pathSegments();
|
||||
List<Name> nameParts = DescriptorUtils.getFqName(descriptor).pathSegments();
|
||||
if (nameParts.size() != checkersWithPrefixChecker.size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public final class AnnotationsUtils {
|
||||
DeclarationDescriptor annotationDeclaration =
|
||||
annotationDescriptor.getType().getConstructor().getDeclarationDescriptor();
|
||||
assert annotationDeclaration != null : "Annotation supposed to have a declaration";
|
||||
return DescriptorUtils.getFQName(annotationDeclaration).asString();
|
||||
return DescriptorUtils.getFqName(annotationDeclaration).asString();
|
||||
}
|
||||
|
||||
public static boolean isNativeObject(@NotNull DeclarationDescriptor descriptor) {
|
||||
|
||||
@@ -36,12 +36,12 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.*;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.getFQName;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.getFqName;
|
||||
|
||||
public final class JsDescriptorUtils {
|
||||
// TODO: maybe we should use external annotations or something else.
|
||||
private static final Set<String> FAKE_CLASSES = ContainerUtil.immutableSet(
|
||||
getFQName(KotlinBuiltIns.getInstance().getAny()).toSafe().asString(),
|
||||
getFqName(KotlinBuiltIns.getInstance().getAny()).toSafe().asString(),
|
||||
"jet.Iterable"
|
||||
);
|
||||
|
||||
@@ -82,7 +82,7 @@ public final class JsDescriptorUtils {
|
||||
@Override
|
||||
public boolean value(JetType type) {
|
||||
ClassDescriptor classDescriptor = getClassDescriptorForType(type);
|
||||
return !FAKE_CLASSES.contains(getFQName(classDescriptor).toSafe().asString());
|
||||
return !FAKE_CLASSES.contains(getFqName(classDescriptor).toSafe().asString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static com.google.dart.compiler.backend.js.ast.JsBinaryOperator.*;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.getFQName;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.getFqName;
|
||||
import static org.jetbrains.k2js.translate.context.Namer.getKotlinBackingFieldName;
|
||||
import static org.jetbrains.k2js.translate.utils.BindingUtils.getFunctionDescriptorForOperationExpression;
|
||||
import static org.jetbrains.k2js.translate.utils.JsAstUtils.assignment;
|
||||
@@ -133,7 +133,7 @@ public final class TranslationUtils {
|
||||
|
||||
@NotNull
|
||||
public static String getMangledName(@NotNull PropertyDescriptor descriptor, @NotNull String suggestedName) {
|
||||
int absHashCode = Math.abs(getFQName(descriptor).asString().hashCode());
|
||||
int absHashCode = Math.abs(getFqName(descriptor).asString().hashCode());
|
||||
return suggestedName + "_" + Integer.toString(absHashCode, Character.MAX_RADIX) + "$";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user