org.jetbrains.kotlin.builtins
Class KotlinBuiltIns

java.lang.Object
  extended by org.jetbrains.kotlin.builtins.KotlinBuiltIns

public class KotlinBuiltIns
extends java.lang.Object


Field Summary
static FqName BUILT_INS_PACKAGE_FQ_NAME
           
static Name BUILT_INS_PACKAGE_NAME
           
static int FUNCTION_TRAIT_COUNT
           
 
Method Summary
 ClassDescriptor getAnnotation()
           
 JetType getAnnotationType()
           
 ClassDescriptor getAny()
           
 JetType getAnyType()
           
 ClassDescriptor getArray()
           
 JetType getArrayElementType(JetType arrayType)
           
 JetType getArrayType(Variance projectionType, JetType argument)
           
 ClassDescriptor getBoolean()
           
 JetType getBooleanType()
           
 ClassDescriptor getBuiltInClassByName(Name simpleName)
           
 ModuleDescriptorImpl getBuiltInsModule()
           
 PackageFragmentDescriptor getBuiltInsPackageFragment()
           
 JetScope getBuiltInsPackageScope()
           
 ClassDescriptor getByte()
           
 JetType getByteType()
           
 ClassDescriptor getChar()
           
 ClassDescriptor getCharSequence()
           
 JetType getCharType()
           
 ClassDescriptor getCloneable()
           
 ClassDescriptor getCollection()
           
 ClassDescriptor getComparable()
           
 ClassDescriptor getDataClassAnnotation()
           
 JetType getDefaultBound()
           
 ClassDescriptor getDeprecatedAnnotation()
           
 ClassDescriptor getDouble()
           
 JetType getDoubleType()
           
 ClassDescriptor getEnum()
           
 JetType getEnumType(JetType argument)
           
 ClassDescriptor getExtensionFunction(int parameterCount)
           
 ClassDescriptor getFloat()
           
 JetType getFloatType()
           
 ClassDescriptor getFunction(int parameterCount)
           
 JetType getFunctionType(Annotations annotations, JetType receiverType, java.util.List<JetType> parameterTypes, JetType returnType)
           
static java.util.List<TypeProjection> getFunctionTypeArgumentProjections(JetType receiverType, java.util.List<JetType> parameterTypes, JetType returnType)
           
 FunctionDescriptor getIdentityEquals()
           
 ClassDescriptor getInlineClassAnnotation()
           
 ClassDescriptor getInlineOptionsClassAnnotation()
           
static KotlinBuiltIns getInstance()
           
 ClassDescriptor getInt()
           
 java.util.Set<DeclarationDescriptor> getIntegralRanges()
           
 JetType getIntType()
           
 ClassDescriptor getIterable()
           
 ClassDescriptor getIterator()
           
 ClassDescriptor getList()
           
 ClassDescriptor getListIterator()
           
 ClassDescriptor getLong()
           
 JetType getLongType()
           
 ClassDescriptor getMap()
           
 ClassDescriptor getMapEntry()
           
 ClassDescriptor getMutableCollection()
           
 ClassDescriptor getMutableIterable()
           
 ClassDescriptor getMutableIterator()
           
 ClassDescriptor getMutableList()
           
 ClassDescriptor getMutableListIterator()
           
 ClassDescriptor getMutableMap()
           
 ClassDescriptor getMutableMapEntry()
           
 ClassDescriptor getMutableSet()
           
static FqName getNoinlineClassAnnotationFqName()
           
 ClassDescriptor getNothing()
           
 JetType getNothingType()
           
 JetType getNullableAnyType()
           
 JetType getNullableNothingType()
           
 JetType getNullablePrimitiveJetType(PrimitiveType primitiveType)
           
 ClassDescriptor getNumber()
           
static java.util.List<TypeProjection> getParameterTypeProjectionsFromFunctionType(JetType type)
           
 ClassDescriptor getPrimitiveArrayClassDescriptor(PrimitiveType type)
           
 JetType getPrimitiveArrayJetType(PrimitiveType primitiveType)
           
 JetType getPrimitiveArrayJetTypeByPrimitiveJetType(JetType jetType)
           
 ClassDescriptor getPrimitiveClassDescriptor(PrimitiveType type)
           
 JetType getPrimitiveJetType(PrimitiveType type)
           
 ClassDescriptor getPropertyMetadata()
           
 ClassDescriptor getPropertyMetadataImpl()
           
static JetType getReceiverType(JetType type)
           
static JetType getReturnTypeFromFunctionType(JetType type)
           
 ClassDescriptor getSet()
           
 ClassDescriptor getShort()
           
 JetType getShortType()
           
 ClassDescriptor getString()
           
 JetType getStringType()
           
 ClassDescriptor getThrowable()
           
 ClassDescriptor getUnit()
           
 JetType getUnitType()
           
static java.util.List<ValueParameterDescriptor> getValueParameters(FunctionDescriptor functionDescriptor, JetType type)
           
static boolean isAny(ClassDescriptor descriptor)
           
static boolean isAny(FqNameUnsafe fqName)
           
static boolean isAnyOrNullableAny(JetType type)
           
static boolean isArray(JetType type)
           
 boolean isBooleanOrSubtype(JetType type)
           
static boolean isCloneable(ClassDescriptor descriptor)
           
static boolean isData(ClassDescriptor classDescriptor)
           
static boolean isDeprecated(DeclarationDescriptor declarationDescriptor)
           
static boolean isExactExtensionFunctionType(FqNameUnsafe fqName)
           
static boolean isExactExtensionFunctionType(JetType type)
           
static boolean isExactFunctionOrExtensionFunctionType(JetType type)
           
static boolean isExactFunctionType(FqNameUnsafe fqName)
           
static boolean isExactFunctionType(JetType type)
           
static boolean isExtensionFunctionType(JetType type)
           
static boolean isFunctionOrExtensionFunctionType(JetType type)
           
static boolean isFunctionType(JetType type)
           
static boolean isNothing(JetType type)
           
static boolean isNothingOrNullableNothing(JetType type)
           
static boolean isNullableAny(JetType type)
           
static boolean isNullableNothing(JetType type)
           
static boolean isPrimitiveArray(JetType type)
           
static boolean isPrimitiveType(JetType type)
           
static boolean isSpecialClassWithNoSupertypes(ClassDescriptor descriptor)
           
static boolean isString(JetType type)
           
static boolean isSuppressAnnotation(AnnotationDescriptor annotationDescriptor)
           
static boolean isTailRecursive(DeclarationDescriptor declarationDescriptor)
           
static boolean isUnit(JetType type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUILT_INS_PACKAGE_NAME

public static final Name BUILT_INS_PACKAGE_NAME

BUILT_INS_PACKAGE_FQ_NAME

public static final FqName BUILT_INS_PACKAGE_FQ_NAME

FUNCTION_TRAIT_COUNT

public static final int FUNCTION_TRAIT_COUNT
See Also:
Constant Field Values
Method Detail

getInstance

@NotNull
public static KotlinBuiltIns getInstance()

getBuiltInsModule

@NotNull
public ModuleDescriptorImpl getBuiltInsModule()

getBuiltInsPackageFragment

@NotNull
public PackageFragmentDescriptor getBuiltInsPackageFragment()

getBuiltInsPackageScope

@NotNull
public JetScope getBuiltInsPackageScope()

getBuiltInClassByName

@NotNull
public ClassDescriptor getBuiltInClassByName(@NotNull
                                                     Name simpleName)

getAny

@NotNull
public ClassDescriptor getAny()

getNothing

@NotNull
public ClassDescriptor getNothing()

getPrimitiveClassDescriptor

@NotNull
public ClassDescriptor getPrimitiveClassDescriptor(@NotNull
                                                           PrimitiveType type)

getByte

@NotNull
public ClassDescriptor getByte()

getShort

@NotNull
public ClassDescriptor getShort()

getInt

@NotNull
public ClassDescriptor getInt()

getLong

@NotNull
public ClassDescriptor getLong()

getFloat

@NotNull
public ClassDescriptor getFloat()

getDouble

@NotNull
public ClassDescriptor getDouble()

getChar

@NotNull
public ClassDescriptor getChar()

getBoolean

@NotNull
public ClassDescriptor getBoolean()

getIntegralRanges

@NotNull
public java.util.Set<DeclarationDescriptor> getIntegralRanges()

getArray

@NotNull
public ClassDescriptor getArray()

getPrimitiveArrayClassDescriptor

@NotNull
public ClassDescriptor getPrimitiveArrayClassDescriptor(@NotNull
                                                                PrimitiveType type)

getNumber

@NotNull
public ClassDescriptor getNumber()

getUnit

@NotNull
public ClassDescriptor getUnit()

getFunction

@NotNull
public ClassDescriptor getFunction(int parameterCount)

getExtensionFunction

@NotNull
public ClassDescriptor getExtensionFunction(int parameterCount)

getThrowable

@NotNull
public ClassDescriptor getThrowable()

getCloneable

@NotNull
public ClassDescriptor getCloneable()

getDataClassAnnotation

@NotNull
public ClassDescriptor getDataClassAnnotation()

getNoinlineClassAnnotationFqName

@NotNull
public static FqName getNoinlineClassAnnotationFqName()

getInlineClassAnnotation

@NotNull
public ClassDescriptor getInlineClassAnnotation()

getInlineOptionsClassAnnotation

@NotNull
public ClassDescriptor getInlineOptionsClassAnnotation()

getDeprecatedAnnotation

@NotNull
public ClassDescriptor getDeprecatedAnnotation()

getString

@NotNull
public ClassDescriptor getString()

getCharSequence

@NotNull
public ClassDescriptor getCharSequence()

getComparable

@NotNull
public ClassDescriptor getComparable()

getEnum

@NotNull
public ClassDescriptor getEnum()

getAnnotation

@NotNull
public ClassDescriptor getAnnotation()

getIterator

@NotNull
public ClassDescriptor getIterator()

getIterable

@NotNull
public ClassDescriptor getIterable()

getMutableIterable

@NotNull
public ClassDescriptor getMutableIterable()

getMutableIterator

@NotNull
public ClassDescriptor getMutableIterator()

getCollection

@NotNull
public ClassDescriptor getCollection()

getMutableCollection

@NotNull
public ClassDescriptor getMutableCollection()

getList

@NotNull
public ClassDescriptor getList()

getMutableList

@NotNull
public ClassDescriptor getMutableList()

getSet

@NotNull
public ClassDescriptor getSet()

getMutableSet

@NotNull
public ClassDescriptor getMutableSet()

getMap

@NotNull
public ClassDescriptor getMap()

getMutableMap

@NotNull
public ClassDescriptor getMutableMap()

getMapEntry

@NotNull
public ClassDescriptor getMapEntry()

getMutableMapEntry

@NotNull
public ClassDescriptor getMutableMapEntry()

getListIterator

@NotNull
public ClassDescriptor getListIterator()

getMutableListIterator

@NotNull
public ClassDescriptor getMutableListIterator()

getNothingType

@NotNull
public JetType getNothingType()

getNullableNothingType

@NotNull
public JetType getNullableNothingType()

getAnyType

@NotNull
public JetType getAnyType()

getNullableAnyType

@NotNull
public JetType getNullableAnyType()

getPrimitiveJetType

@NotNull
public JetType getPrimitiveJetType(@NotNull
                                           PrimitiveType type)

getNullablePrimitiveJetType

@NotNull
public JetType getNullablePrimitiveJetType(@NotNull
                                                   PrimitiveType primitiveType)

getByteType

@NotNull
public JetType getByteType()

getShortType

@NotNull
public JetType getShortType()

getIntType

@NotNull
public JetType getIntType()

getLongType

@NotNull
public JetType getLongType()

getFloatType

@NotNull
public JetType getFloatType()

getDoubleType

@NotNull
public JetType getDoubleType()

getCharType

@NotNull
public JetType getCharType()

getBooleanType

@NotNull
public JetType getBooleanType()

getUnitType

@NotNull
public JetType getUnitType()

getStringType

@NotNull
public JetType getStringType()

getArrayElementType

@NotNull
public JetType getArrayElementType(@NotNull
                                           JetType arrayType)

getPrimitiveArrayJetType

@NotNull
public JetType getPrimitiveArrayJetType(@NotNull
                                                PrimitiveType primitiveType)

getPrimitiveArrayJetTypeByPrimitiveJetType

@Nullable
public JetType getPrimitiveArrayJetTypeByPrimitiveJetType(@NotNull
                                                                   JetType jetType)
Returns:
null if not primitive

getArrayType

@NotNull
public JetType getArrayType(@NotNull
                                    Variance projectionType,
                                    @NotNull
                                    JetType argument)

getEnumType

@NotNull
public JetType getEnumType(@NotNull
                                   JetType argument)

getAnnotationType

@NotNull
public JetType getAnnotationType()

getPropertyMetadata

@NotNull
public ClassDescriptor getPropertyMetadata()

getPropertyMetadataImpl

@NotNull
public ClassDescriptor getPropertyMetadataImpl()

getFunctionType

@NotNull
public JetType getFunctionType(@NotNull
                                       Annotations annotations,
                                       @Nullable
                                       JetType receiverType,
                                       @NotNull
                                       java.util.List<JetType> parameterTypes,
                                       @NotNull
                                       JetType returnType)

getFunctionTypeArgumentProjections

@NotNull
public static java.util.List<TypeProjection> getFunctionTypeArgumentProjections(@Nullable
                                                                                        JetType receiverType,
                                                                                        @NotNull
                                                                                        java.util.List<JetType> parameterTypes,
                                                                                        @NotNull
                                                                                        JetType returnType)

isArray

public static boolean isArray(@NotNull
                              JetType type)

isPrimitiveArray

public static boolean isPrimitiveArray(@NotNull
                                       JetType type)

isPrimitiveType

public static boolean isPrimitiveType(@NotNull
                                      JetType type)

isFunctionOrExtensionFunctionType

public static boolean isFunctionOrExtensionFunctionType(@NotNull
                                                        JetType type)

isFunctionType

public static boolean isFunctionType(@NotNull
                                     JetType type)

isExtensionFunctionType

public static boolean isExtensionFunctionType(@NotNull
                                              JetType type)

isExactFunctionOrExtensionFunctionType

public static boolean isExactFunctionOrExtensionFunctionType(@NotNull
                                                             JetType type)

isExactFunctionType

public static boolean isExactFunctionType(@NotNull
                                          JetType type)

isExactExtensionFunctionType

public static boolean isExactExtensionFunctionType(@NotNull
                                                   JetType type)

isExactFunctionType

public static boolean isExactFunctionType(@NotNull
                                          FqNameUnsafe fqName)

isExactExtensionFunctionType

public static boolean isExactExtensionFunctionType(@NotNull
                                                   FqNameUnsafe fqName)

getReceiverType

@Nullable
public static JetType getReceiverType(@NotNull
                                               JetType type)

getValueParameters

@NotNull
public static java.util.List<ValueParameterDescriptor> getValueParameters(@NotNull
                                                                                  FunctionDescriptor functionDescriptor,
                                                                                  @NotNull
                                                                                  JetType type)

getReturnTypeFromFunctionType

@NotNull
public static JetType getReturnTypeFromFunctionType(@NotNull
                                                            JetType type)

getParameterTypeProjectionsFromFunctionType

@NotNull
public static java.util.List<TypeProjection> getParameterTypeProjectionsFromFunctionType(@NotNull
                                                                                                 JetType type)

isSpecialClassWithNoSupertypes

public static boolean isSpecialClassWithNoSupertypes(@NotNull
                                                     ClassDescriptor descriptor)

isAny

public static boolean isAny(@NotNull
                            ClassDescriptor descriptor)

isAny

public static boolean isAny(@NotNull
                            FqNameUnsafe fqName)

isNothing

public static boolean isNothing(@NotNull
                                JetType type)

isNullableNothing

public static boolean isNullableNothing(@NotNull
                                        JetType type)

isNothingOrNullableNothing

public static boolean isNothingOrNullableNothing(@NotNull
                                                 JetType type)

isAnyOrNullableAny

public static boolean isAnyOrNullableAny(@NotNull
                                         JetType type)

isNullableAny

public static boolean isNullableAny(@NotNull
                                    JetType type)

isUnit

public static boolean isUnit(@NotNull
                             JetType type)

isBooleanOrSubtype

public boolean isBooleanOrSubtype(@NotNull
                                  JetType type)

isString

public static boolean isString(@Nullable
                               JetType type)

isCloneable

public static boolean isCloneable(@NotNull
                                  ClassDescriptor descriptor)

isData

public static boolean isData(@NotNull
                             ClassDescriptor classDescriptor)

isDeprecated

public static boolean isDeprecated(@NotNull
                                   DeclarationDescriptor declarationDescriptor)

isTailRecursive

public static boolean isTailRecursive(@NotNull
                                      DeclarationDescriptor declarationDescriptor)

isSuppressAnnotation

public static boolean isSuppressAnnotation(@NotNull
                                           AnnotationDescriptor annotationDescriptor)

getDefaultBound

@NotNull
public JetType getDefaultBound()

getIdentityEquals

@NotNull
public FunctionDescriptor getIdentityEquals()