org.jetbrains.kotlin.builtins
Class KotlinBuiltIns

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

public abstract class KotlinBuiltIns
extends java.lang.Object


Nested Class Summary
static class KotlinBuiltIns.FqNames
           
 
Field Summary
static FqName BUILT_INS_PACKAGE_FQ_NAME
           
static java.util.Set<FqName> BUILT_INS_PACKAGE_FQ_NAMES
           
static Name BUILT_INS_PACKAGE_NAME
           
static Name BUILTINS_MODULE_NAME
           
static FqName COLLECTIONS_PACKAGE_FQ_NAME
           
static KotlinBuiltIns.FqNames FQ_NAMES
           
static FqName RANGES_PACKAGE_FQ_NAME
           
static FqName TEXT_PACKAGE_FQ_NAME
           
 
Constructor Summary
protected KotlinBuiltIns(StorageManager storageManager)
           
 
Method Summary
protected  void createBuiltInsModule()
           
protected  AdditionalClassPartsProvider getAdditionalClassPartsProvider()
           
 ClassDescriptor getAnnotation()
           
 ClassDescriptor getAnnotationRetentionEnumEntry(KotlinRetention retention)
           
 ClassDescriptor getAnnotationTargetEnumEntry(KotlinTarget target)
           
 SimpleType getAnnotationType()
           
 ClassDescriptor getAny()
           
 SimpleType getAnyType()
           
 ClassDescriptor getArray()
           
 KotlinType getArrayElementType(KotlinType arrayType)
           
 SimpleType getArrayType(Variance projectionType, KotlinType argument)
           
 ClassDescriptor getBoolean()
           
 SimpleType getBooleanType()
           
 ClassDescriptor getBuiltInClassByFqName(FqName fqName)
           
 ClassDescriptor getBuiltInClassByFqNameNullable(FqName fqName)
           
 ClassDescriptor getBuiltInClassByName(Name simpleName)
           
 ClassDescriptor getBuiltInClassByNameNullable(Name simpleName)
           
 ModuleDescriptorImpl getBuiltInsModule()
           
 PackageFragmentDescriptor getBuiltInsPackageFragment()
           
 java.util.Set<PackageFragmentDescriptor> getBuiltInsPackageFragmentsImportedByDefault()
           
 MemberScope getBuiltInsPackageScope()
           
 ClassDescriptor getByte()
           
 SimpleType getByteType()
           
 ClassDescriptor getChar()
           
 SimpleType getCharType()
           
protected  java.lang.Iterable<ClassDescriptorFactory> getClassDescriptorFactories()
           
 ClassDescriptor getCollection()
           
 ClassDescriptor getComparable()
           
 SimpleType getDefaultBound()
           
 ClassDescriptor getDeprecatedAnnotation()
           
 ClassDescriptor getDeprecationLevelEnumEntry(java.lang.String level)
           
 ClassDescriptor getDouble()
           
 SimpleType getDoubleType()
           
 ClassDescriptor getEnum()
           
 SimpleType getEnumType(SimpleType argument)
           
 ClassDescriptor getFloat()
           
 SimpleType getFloatType()
           
 ClassDescriptor getFunction(int parameterCount)
           
static ClassId getFunctionClassId(int parameterCount)
           
static java.lang.String getFunctionName(int parameterCount)
           
 ClassDescriptor getInt()
           
 SimpleType getIntType()
           
 ClassDescriptor getIterable()
           
 KotlinType getIterableType()
           
 ClassDescriptor getIterator()
           
 ClassDescriptor getList()
           
 ClassDescriptor getListIterator()
           
 ClassDescriptor getLong()
           
 SimpleType getLongType()
           
 ClassDescriptor getMap()
           
 ClassDescriptor getMapEntry()
           
 ClassDescriptor getMustBeDocumentedAnnotation()
           
 ClassDescriptor getMutableCollection()
           
 ClassDescriptor getMutableIterable()
           
 ClassDescriptor getMutableIterator()
           
 ClassDescriptor getMutableList()
           
 ClassDescriptor getMutableListIterator()
           
 ClassDescriptor getMutableMap()
           
 ClassDescriptor getMutableMapEntry()
           
 ClassDescriptor getMutableSet()
           
 ClassDescriptor getNothing()
           
 SimpleType getNothingType()
           
 SimpleType getNullableAnyType()
           
 SimpleType getNullableNothingType()
           
 ClassDescriptor getNumber()
           
protected  PlatformDependentDeclarationFilter getPlatformDependentDeclarationFilter()
           
 ClassDescriptor getPrimitiveArrayClassDescriptor(PrimitiveType type)
           
 SimpleType getPrimitiveArrayKotlinType(PrimitiveType primitiveType)
           
 SimpleType getPrimitiveArrayKotlinTypeByPrimitiveKotlinType(KotlinType kotlinType)
           
static FqName getPrimitiveFqName(PrimitiveType primitiveType)
           
 SimpleType getPrimitiveKotlinType(PrimitiveType type)
           
static PrimitiveType getPrimitiveTypeByArrayClassFqName(FqNameUnsafe primitiveArrayClassFqName)
           
static PrimitiveType getPrimitiveTypeByFqName(FqNameUnsafe primitiveClassFqName)
           
 ClassDescriptor getRepeatableAnnotation()
           
 ClassDescriptor getRetentionAnnotation()
           
 ClassDescriptor getSet()
           
 ClassDescriptor getShort()
           
 SimpleType getShortType()
           
protected  StorageManager getStorageManager()
           
 ClassDescriptor getString()
           
 SimpleType getStringType()
           
 ClassDescriptor getSuspendFunction(int parameterCount)
           
 ClassDescriptor getTargetAnnotation()
           
 ClassDescriptor getThrowable()
           
 ClassDescriptor getUnit()
           
 SimpleType getUnitType()
           
static boolean isAny(ClassDescriptor descriptor)
           
static boolean isAny(KotlinType type)
           
static boolean isAnyOrNullableAny(KotlinType type)
           
static boolean isArray(KotlinType type)
           
static boolean isArrayOrPrimitiveArray(ClassDescriptor descriptor)
           
static boolean isBoolean(KotlinType type)
           
static boolean isBooleanOrNullableBoolean(KotlinType type)
           
 boolean isBooleanOrSubtype(KotlinType type)
           
static boolean isBuiltIn(DeclarationDescriptor descriptor)
           
static boolean isByte(KotlinType type)
           
static boolean isChar(KotlinType type)
           
static boolean isCharOrNullableChar(KotlinType type)
           
static boolean isCharSequenceOrNullableCharSequence(KotlinType type)
           
static boolean isCloneable(ClassDescriptor descriptor)
           
static boolean isCollectionOrNullableCollection(KotlinType type)
           
static boolean isConstructedFromGivenClass(KotlinType type, FqName fqName)
           
static boolean isConstructedFromGivenClass(KotlinType type, FqNameUnsafe fqName)
           
static boolean isDefaultBound(KotlinType type)
           
static boolean isDeprecated(DeclarationDescriptor declarationDescriptor)
           
static boolean isDouble(KotlinType type)
           
static boolean isDoubleOrNullableDouble(KotlinType type)
           
static boolean isFloat(KotlinType type)
           
static boolean isFloatOrNullableFloat(KotlinType type)
           
static boolean isInt(KotlinType type)
           
static boolean isIterableOrNullableIterable(KotlinType type)
           
static boolean isKClass(ClassDescriptor descriptor)
           
static boolean isListOrNullableList(KotlinType type)
           
static boolean isLong(KotlinType type)
           
static boolean isMapOrNullableMap(KotlinType type)
           
 boolean isMemberOfAny(DeclarationDescriptor descriptor)
           
static boolean isNonPrimitiveArray(ClassDescriptor descriptor)
           
static boolean isNothing(KotlinType type)
           
static boolean isNothingOrNullableNothing(KotlinType type)
           
static boolean isNullableAny(KotlinType type)
           
static boolean isNullableNothing(KotlinType type)
           
static boolean isPrimitiveArray(FqNameUnsafe arrayFqName)
           
static boolean isPrimitiveArray(KotlinType type)
           
static boolean isPrimitiveClass(ClassDescriptor descriptor)
           
static boolean isPrimitiveType(KotlinType type)
           
static boolean isSetOrNullableSet(KotlinType type)
           
static boolean isShort(KotlinType type)
           
static boolean isSpecialClassWithNoSupertypes(ClassDescriptor descriptor)
           
static boolean isString(KotlinType type)
           
static boolean isStringOrNullableString(KotlinType type)
           
static boolean isSuppressAnnotation(AnnotationDescriptor annotationDescriptor)
           
static boolean isUnit(KotlinType type)
           
static boolean isUnitOrNullableUnit(KotlinType type)
           
 void setBuiltInsModule(ModuleDescriptorImpl module)
           
 
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

COLLECTIONS_PACKAGE_FQ_NAME

public static final FqName COLLECTIONS_PACKAGE_FQ_NAME

RANGES_PACKAGE_FQ_NAME

public static final FqName RANGES_PACKAGE_FQ_NAME

TEXT_PACKAGE_FQ_NAME

public static final FqName TEXT_PACKAGE_FQ_NAME

BUILT_INS_PACKAGE_FQ_NAMES

public static final java.util.Set<FqName> BUILT_INS_PACKAGE_FQ_NAMES

FQ_NAMES

public static final KotlinBuiltIns.FqNames FQ_NAMES

BUILTINS_MODULE_NAME

public static final Name BUILTINS_MODULE_NAME
Constructor Detail

KotlinBuiltIns

protected KotlinBuiltIns(@NotNull
                         StorageManager storageManager)
Method Detail

createBuiltInsModule

protected void createBuiltInsModule()

setBuiltInsModule

public void setBuiltInsModule(@NotNull
                              ModuleDescriptorImpl module)

getAdditionalClassPartsProvider

@NotNull
protected AdditionalClassPartsProvider getAdditionalClassPartsProvider()

getPlatformDependentDeclarationFilter

@NotNull
protected PlatformDependentDeclarationFilter getPlatformDependentDeclarationFilter()

getClassDescriptorFactories

@NotNull
protected java.lang.Iterable<ClassDescriptorFactory> getClassDescriptorFactories()

getStorageManager

@NotNull
protected StorageManager getStorageManager()

getBuiltInsModule

@NotNull
public ModuleDescriptorImpl getBuiltInsModule()

getBuiltInsPackageFragmentsImportedByDefault

@NotNull
public java.util.Set<PackageFragmentDescriptor> getBuiltInsPackageFragmentsImportedByDefault()

getBuiltInsPackageFragment

@NotNull
public PackageFragmentDescriptor getBuiltInsPackageFragment()

isBuiltIn

public static boolean isBuiltIn(@NotNull
                                DeclarationDescriptor descriptor)

getBuiltInsPackageScope

@NotNull
public MemberScope getBuiltInsPackageScope()

getBuiltInClassByName

@NotNull
public ClassDescriptor getBuiltInClassByName(@NotNull
                                                     Name simpleName)

getBuiltInClassByNameNullable

@Nullable
public ClassDescriptor getBuiltInClassByNameNullable(@NotNull
                                                              Name simpleName)

getBuiltInClassByFqNameNullable

@Nullable
public ClassDescriptor getBuiltInClassByFqNameNullable(@NotNull
                                                                FqName fqName)

getBuiltInClassByFqName

@NotNull
public ClassDescriptor getBuiltInClassByFqName(@NotNull
                                                       FqName fqName)

getAny

@NotNull
public ClassDescriptor getAny()

getNothing

@NotNull
public ClassDescriptor getNothing()

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()

getArray

@NotNull
public ClassDescriptor getArray()

getPrimitiveArrayClassDescriptor

@NotNull
public ClassDescriptor getPrimitiveArrayClassDescriptor(@NotNull
                                                                PrimitiveType type)

getNumber

@NotNull
public ClassDescriptor getNumber()

getUnit

@NotNull
public ClassDescriptor getUnit()

getFunctionName

@NotNull
public static java.lang.String getFunctionName(int parameterCount)

getFunctionClassId

@NotNull
public static ClassId getFunctionClassId(int parameterCount)

getFunction

@NotNull
public ClassDescriptor getFunction(int parameterCount)

getSuspendFunction

@NotNull
public ClassDescriptor getSuspendFunction(int parameterCount)

getThrowable

@NotNull
public ClassDescriptor getThrowable()

getDeprecatedAnnotation

@NotNull
public ClassDescriptor getDeprecatedAnnotation()

getDeprecationLevelEnumEntry

@Nullable
public ClassDescriptor getDeprecationLevelEnumEntry(@NotNull
                                                             java.lang.String level)

getTargetAnnotation

@NotNull
public ClassDescriptor getTargetAnnotation()

getRetentionAnnotation

@NotNull
public ClassDescriptor getRetentionAnnotation()

getRepeatableAnnotation

@NotNull
public ClassDescriptor getRepeatableAnnotation()

getMustBeDocumentedAnnotation

@NotNull
public ClassDescriptor getMustBeDocumentedAnnotation()

getAnnotationTargetEnumEntry

@Nullable
public ClassDescriptor getAnnotationTargetEnumEntry(@NotNull
                                                             KotlinTarget target)

getAnnotationRetentionEnumEntry

@Nullable
public ClassDescriptor getAnnotationRetentionEnumEntry(@NotNull
                                                                KotlinRetention retention)

getString

@NotNull
public ClassDescriptor getString()

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 SimpleType getNothingType()

getNullableNothingType

@NotNull
public SimpleType getNullableNothingType()

getAnyType

@NotNull
public SimpleType getAnyType()

getNullableAnyType

@NotNull
public SimpleType getNullableAnyType()

getDefaultBound

@NotNull
public SimpleType getDefaultBound()

getPrimitiveKotlinType

@NotNull
public SimpleType getPrimitiveKotlinType(@NotNull
                                                 PrimitiveType type)

getByteType

@NotNull
public SimpleType getByteType()

getShortType

@NotNull
public SimpleType getShortType()

getIntType

@NotNull
public SimpleType getIntType()

getLongType

@NotNull
public SimpleType getLongType()

getFloatType

@NotNull
public SimpleType getFloatType()

getDoubleType

@NotNull
public SimpleType getDoubleType()

getCharType

@NotNull
public SimpleType getCharType()

getBooleanType

@NotNull
public SimpleType getBooleanType()

getUnitType

@NotNull
public SimpleType getUnitType()

getStringType

@NotNull
public SimpleType getStringType()

getIterableType

@NotNull
public KotlinType getIterableType()

getArrayElementType

@NotNull
public KotlinType getArrayElementType(@NotNull
                                              KotlinType arrayType)

getPrimitiveArrayKotlinType

@NotNull
public SimpleType getPrimitiveArrayKotlinType(@NotNull
                                                      PrimitiveType primitiveType)

getPrimitiveArrayKotlinTypeByPrimitiveKotlinType

@Nullable
public SimpleType getPrimitiveArrayKotlinTypeByPrimitiveKotlinType(@NotNull
                                                                            KotlinType kotlinType)
Returns:
null if not primitive

isPrimitiveArray

public static boolean isPrimitiveArray(@NotNull
                                       FqNameUnsafe arrayFqName)

getPrimitiveTypeByFqName

@Nullable
public static PrimitiveType getPrimitiveTypeByFqName(@NotNull
                                                              FqNameUnsafe primitiveClassFqName)

getPrimitiveTypeByArrayClassFqName

@Nullable
public static PrimitiveType getPrimitiveTypeByArrayClassFqName(@NotNull
                                                                        FqNameUnsafe primitiveArrayClassFqName)

getArrayType

@NotNull
public SimpleType getArrayType(@NotNull
                                       Variance projectionType,
                                       @NotNull
                                       KotlinType argument)

getEnumType

@NotNull
public SimpleType getEnumType(@NotNull
                                      SimpleType argument)

getAnnotationType

@NotNull
public SimpleType getAnnotationType()

isArray

public static boolean isArray(@NotNull
                              KotlinType type)

isArrayOrPrimitiveArray

public static boolean isArrayOrPrimitiveArray(@NotNull
                                              ClassDescriptor descriptor)

isPrimitiveArray

public static boolean isPrimitiveArray(@NotNull
                                       KotlinType type)

isPrimitiveType

public static boolean isPrimitiveType(@NotNull
                                      KotlinType type)

isPrimitiveClass

public static boolean isPrimitiveClass(@NotNull
                                       ClassDescriptor descriptor)

isConstructedFromGivenClass

public static boolean isConstructedFromGivenClass(@NotNull
                                                  KotlinType type,
                                                  @NotNull
                                                  FqNameUnsafe fqName)

isConstructedFromGivenClass

public static boolean isConstructedFromGivenClass(@NotNull
                                                  KotlinType type,
                                                  @NotNull
                                                  FqName fqName)

isSpecialClassWithNoSupertypes

public static boolean isSpecialClassWithNoSupertypes(@NotNull
                                                     ClassDescriptor descriptor)

isAny

public static boolean isAny(@NotNull
                            ClassDescriptor descriptor)

isAny

public static boolean isAny(@NotNull
                            KotlinType type)

isBoolean

public static boolean isBoolean(@NotNull
                                KotlinType type)

isBooleanOrNullableBoolean

public static boolean isBooleanOrNullableBoolean(@NotNull
                                                 KotlinType type)

isChar

public static boolean isChar(@NotNull
                             KotlinType type)

isCharOrNullableChar

public static boolean isCharOrNullableChar(@NotNull
                                           KotlinType type)

isInt

public static boolean isInt(@NotNull
                            KotlinType type)

isByte

public static boolean isByte(@NotNull
                             KotlinType type)

isLong

public static boolean isLong(@NotNull
                             KotlinType type)

isShort

public static boolean isShort(@NotNull
                              KotlinType type)

isFloat

public static boolean isFloat(@NotNull
                              KotlinType type)

isFloatOrNullableFloat

public static boolean isFloatOrNullableFloat(@NotNull
                                             KotlinType type)

isDouble

public static boolean isDouble(@NotNull
                               KotlinType type)

isDoubleOrNullableDouble

public static boolean isDoubleOrNullableDouble(@NotNull
                                               KotlinType type)

isNothing

public static boolean isNothing(@NotNull
                                KotlinType type)

isNullableNothing

public static boolean isNullableNothing(@NotNull
                                        KotlinType type)

isNothingOrNullableNothing

public static boolean isNothingOrNullableNothing(@NotNull
                                                 KotlinType type)

isAnyOrNullableAny

public static boolean isAnyOrNullableAny(@NotNull
                                         KotlinType type)

isNullableAny

public static boolean isNullableAny(@NotNull
                                    KotlinType type)

isDefaultBound

public static boolean isDefaultBound(@NotNull
                                     KotlinType type)

isUnit

public static boolean isUnit(@NotNull
                             KotlinType type)

isUnitOrNullableUnit

public static boolean isUnitOrNullableUnit(@NotNull
                                           KotlinType type)

isBooleanOrSubtype

public boolean isBooleanOrSubtype(@NotNull
                                  KotlinType type)

isMemberOfAny

public boolean isMemberOfAny(@NotNull
                             DeclarationDescriptor descriptor)

isString

public static boolean isString(@Nullable
                               KotlinType type)

isCharSequenceOrNullableCharSequence

public static boolean isCharSequenceOrNullableCharSequence(@Nullable
                                                           KotlinType type)

isStringOrNullableString

public static boolean isStringOrNullableString(@Nullable
                                               KotlinType type)

isCollectionOrNullableCollection

public static boolean isCollectionOrNullableCollection(@NotNull
                                                       KotlinType type)

isListOrNullableList

public static boolean isListOrNullableList(@NotNull
                                           KotlinType type)

isSetOrNullableSet

public static boolean isSetOrNullableSet(@NotNull
                                         KotlinType type)

isMapOrNullableMap

public static boolean isMapOrNullableMap(@NotNull
                                         KotlinType type)

isIterableOrNullableIterable

public static boolean isIterableOrNullableIterable(@NotNull
                                                   KotlinType type)

isKClass

public static boolean isKClass(@NotNull
                               ClassDescriptor descriptor)

isNonPrimitiveArray

public static boolean isNonPrimitiveArray(@NotNull
                                          ClassDescriptor descriptor)

isCloneable

public static boolean isCloneable(@NotNull
                                  ClassDescriptor descriptor)

isDeprecated

public static boolean isDeprecated(@NotNull
                                   DeclarationDescriptor declarationDescriptor)

getPrimitiveFqName

public static FqName getPrimitiveFqName(@NotNull
                                        PrimitiveType primitiveType)

isSuppressAnnotation

public static boolean isSuppressAnnotation(@NotNull
                                           AnnotationDescriptor annotationDescriptor)