org.jetbrains.jet.codegen
Class CodegenUtil
java.lang.Object
org.jetbrains.jet.codegen.CodegenUtil
public class CodegenUtil
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isInterface
public static boolean isInterface(DeclarationDescriptor descriptor)
isInterface
public static boolean isInterface(JetType type)
createInvoke
public static SimpleFunctionDescriptor createInvoke(FunctionDescriptor fd)
isNonLiteralObject
public static boolean isNonLiteralObject(JetClassOrObject myClass)
createTmpVariableName
public static java.lang.String createTmpVariableName(java.util.Collection<java.lang.String> existingNames)
erasedInvokeSignature
public static JvmMethodSignature erasedInvokeSignature(FunctionDescriptor fd)
isConst
public static boolean isConst(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)