org.jetbrains.jet.codegen
Class CodegenUtil

java.lang.Object
  extended by org.jetbrains.jet.codegen.CodegenUtil

public class CodegenUtil
extends java.lang.Object


Method Summary
static boolean couldUseDirectAccessToProperty(PropertyDescriptor propertyDescriptor, boolean forGetter, boolean isInsideClass, boolean isDelegated)
           
static SimpleFunctionDescriptor createInvoke(FunctionDescriptor fd)
           
static JvmMethodSignature erasedInvokeSignature(FunctionDescriptor fd)
           
static FunctionDescriptor getDeclaredFunctionByRawSignature(ClassDescriptor owner, Name name, ClassifierDescriptor returnedClassifier, ClassifierDescriptor... valueParameterClassifiers)
           
static ClassDescriptor getExpectedThisObjectForConstructorCall(ConstructorDescriptor descriptor, CalculatedClosure closure)
           
static ImplementationBodyCodegen getParentBodyCodegen(MemberCodegen classBodyCodegen)
           
static JetType getSuperClass(ClassDescriptor classDescriptor)
           
static boolean hasAbstractMembers(ClassDescriptor classDescriptor)
           
static boolean isCallInsideSameClassAsDeclared(CallableMemberDescriptor declarationDescriptor, CodegenContext context)
           
static boolean isCallInsideSameModuleAsDeclared(CallableMemberDescriptor declarationDescriptor, CodegenContext context)
           
static boolean isConst(CalculatedClosure closure)
           
static boolean isInterface(DeclarationDescriptor descriptor)
           
static boolean isInterface(JetType type)
           
static boolean isNullableType(JetType type)
          A work-around of the generic nullability problem in the type checker
static
<T> T
peekFromStack(com.intellij.util.containers.Stack<T> stack)
           
static
<T extends CallableMemberDescriptor>
T
unwrapFakeOverride(T member)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isInterface

public static boolean isInterface(DeclarationDescriptor descriptor)

isInterface

public static boolean isInterface(JetType type)

createInvoke

public static SimpleFunctionDescriptor createInvoke(FunctionDescriptor fd)

erasedInvokeSignature

public static JvmMethodSignature erasedInvokeSignature(FunctionDescriptor fd)

isConst

public static boolean isConst(@NotNull
                              CalculatedClosure closure)

peekFromStack

public static <T> T peekFromStack(com.intellij.util.containers.Stack<T> stack)

getSuperClass

public static JetType getSuperClass(ClassDescriptor classDescriptor)

unwrapFakeOverride

@NotNull
public static <T extends CallableMemberDescriptor> T unwrapFakeOverride(T member)

getDeclaredFunctionByRawSignature

@Nullable
public static FunctionDescriptor getDeclaredFunctionByRawSignature(@NotNull
                                                                            ClassDescriptor owner,
                                                                            @NotNull
                                                                            Name name,
                                                                            @NotNull
                                                                            ClassifierDescriptor returnedClassifier,
                                                                            @NotNull
                                                                            ClassifierDescriptor... valueParameterClassifiers)

isCallInsideSameClassAsDeclared

public static boolean isCallInsideSameClassAsDeclared(CallableMemberDescriptor declarationDescriptor,
                                                      CodegenContext context)

isCallInsideSameModuleAsDeclared

public static boolean isCallInsideSameModuleAsDeclared(CallableMemberDescriptor declarationDescriptor,
                                                       CodegenContext context)

hasAbstractMembers

public static boolean hasAbstractMembers(@NotNull
                                         ClassDescriptor classDescriptor)

isNullableType

public static boolean isNullableType(@NotNull
                                     JetType type)
A work-around of the generic nullability problem in the type checker

Returns:
true if a value of this type can be null

couldUseDirectAccessToProperty

public static boolean couldUseDirectAccessToProperty(@NotNull
                                                     PropertyDescriptor propertyDescriptor,
                                                     boolean forGetter,
                                                     boolean isInsideClass,
                                                     boolean isDelegated)

getParentBodyCodegen

@NotNull
public static ImplementationBodyCodegen getParentBodyCodegen(@Nullable
                                                                     MemberCodegen classBodyCodegen)

getExpectedThisObjectForConstructorCall

@Nullable
public static ClassDescriptor getExpectedThisObjectForConstructorCall(@NotNull
                                                                               ConstructorDescriptor descriptor,
                                                                               @Nullable
                                                                               CalculatedClosure closure)