org.jetbrains.k2js.translate.utils
Class JsDescriptorUtils

java.lang.Object
  extended by org.jetbrains.k2js.translate.utils.JsDescriptorUtils

public final class JsDescriptorUtils
extends java.lang.Object


Method Summary
static ClassDescriptor findAncestorClass(java.util.List<ClassDescriptor> superclassDescriptors)
           
static ClassDescriptor getContainingClass(DeclarationDescriptor descriptor)
           
static DeclarationDescriptor getContainingDeclaration(DeclarationDescriptor descriptor)
           
static NamespaceDescriptor getContainingNamespace(DeclarationDescriptor descriptor)
           
static DeclarationDescriptor getDeclarationDescriptorForReceiver(ReceiverValue receiverParameter)
           
static DeclarationDescriptor getExpectedReceiverDescriptor(CallableDescriptor callableDescriptor)
           
static DeclarationDescriptor getExpectedThisDescriptor(CallableDescriptor callableDescriptor)
           
static Name getNameIfStandardType(JetExpression expression, TranslationContext context)
           
static Name getNameIfStandardType(JetType type)
           
static FunctionDescriptor getOverriddenDescriptor(FunctionDescriptor functionDescriptor)
           
static ClassDescriptor getSuperclass(ClassDescriptor classDescriptor)
           
static java.util.List<JetType> getSupertypesWithoutFakes(ClassDescriptor descriptor)
           
static boolean hasParameters(FunctionDescriptor functionDescriptor)
           
static boolean isCompareTo(FunctionDescriptor functionDescriptor)
           
static boolean isExtension(CallableDescriptor functionDescriptor)
           
static boolean isSimpleFinalProperty(PropertyDescriptor propertyDescriptor)
           
static boolean isStandardDeclaration(DeclarationDescriptor descriptor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasParameters

public static boolean hasParameters(@NotNull
                                    FunctionDescriptor functionDescriptor)

isCompareTo

public static boolean isCompareTo(@NotNull
                                  FunctionDescriptor functionDescriptor)

findAncestorClass

@Nullable
public static ClassDescriptor findAncestorClass(@NotNull
                                                         java.util.List<ClassDescriptor> superclassDescriptors)

getSuperclass

@Nullable
public static ClassDescriptor getSuperclass(@NotNull
                                                     ClassDescriptor classDescriptor)

getSupertypesWithoutFakes

@NotNull
public static java.util.List<JetType> getSupertypesWithoutFakes(ClassDescriptor descriptor)

getContainingDeclaration

@NotNull
public static DeclarationDescriptor getContainingDeclaration(@NotNull
                                                                     DeclarationDescriptor descriptor)

isExtension

public static boolean isExtension(@NotNull
                                  CallableDescriptor functionDescriptor)

getExpectedThisDescriptor

@Nullable
public static DeclarationDescriptor getExpectedThisDescriptor(@NotNull
                                                                       CallableDescriptor callableDescriptor)

getDeclarationDescriptorForReceiver

@NotNull
public static DeclarationDescriptor getDeclarationDescriptorForReceiver(@NotNull
                                                                                ReceiverValue receiverParameter)

getExpectedReceiverDescriptor

@Nullable
public static DeclarationDescriptor getExpectedReceiverDescriptor(@NotNull
                                                                           CallableDescriptor callableDescriptor)

getContainingClass

@Nullable
public static ClassDescriptor getContainingClass(@NotNull
                                                          DeclarationDescriptor descriptor)

getOverriddenDescriptor

@Nullable
public static FunctionDescriptor getOverriddenDescriptor(@NotNull
                                                                  FunctionDescriptor functionDescriptor)

isSimpleFinalProperty

public static boolean isSimpleFinalProperty(@NotNull
                                            PropertyDescriptor propertyDescriptor)

isStandardDeclaration

public static boolean isStandardDeclaration(@NotNull
                                            DeclarationDescriptor descriptor)

getContainingNamespace

@Nullable
public static NamespaceDescriptor getContainingNamespace(@NotNull
                                                                  DeclarationDescriptor descriptor)

getNameIfStandardType

@Nullable
public static Name getNameIfStandardType(@NotNull
                                                  JetExpression expression,
                                                  @NotNull
                                                  TranslationContext context)

getNameIfStandardType

@Nullable
public static Name getNameIfStandardType(@NotNull
                                                  JetType type)