org.jetbrains.jet.lang.types.lang
Class KotlinBuiltIns

java.lang.Object
  extended by org.jetbrains.jet.lang.types.lang.KotlinBuiltIns

public class KotlinBuiltIns
extends java.lang.Object


Nested Class Summary
static class KotlinBuiltIns.InitializationMode
           
 
Field Summary
static java.lang.String BUILT_INS_DIR
           
static FqName BUILT_INS_PACKAGE_FQ_NAME
           
static int FUNCTION_TRAIT_COUNT
           
static JetScope STUB
           
 
Method Summary
 ClassDescriptor getAnnotation()
           
 JetType getAnnotationType()
           
 ClassDescriptor getAny()
           
 JetType getAnyType()
           
 ClassDescriptor getArray()
           
 JetType getArrayElementType(JetType arrayType)
           
 JetType getArrayType(JetType argument)
           
 JetType getArrayType(Variance projectionType, JetType argument)
           
 ClassDescriptor getBoolean()
           
 JetType getBooleanType()
           
 ClassDescriptor getBuiltInClassByName(Name simpleName)
           
 ModuleDescriptorImpl getBuiltInsModule()
           
 NamespaceDescriptor getBuiltInsPackage()
           
 FqName getBuiltInsPackageFqName()
           
 JetScope getBuiltInsScope()
           
 ClassDescriptor getByte()
           
 JetType getByteType()
           
 ClassDescriptor getChar()
           
 ClassDescriptor getCharSequence()
           
 JetType getCharType()
           
 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(java.util.List<AnnotationDescriptor> annotations, JetType receiverType, java.util.List<JetType> parameterTypes, JetType returnType)
           
static KotlinBuiltIns getInstance()
           
 ClassDescriptor getInt()
           
 java.util.Set<DeclarationDescriptor> getIntegralRanges()
           
 JetType getIntType()
           
 ClassDescriptor getIterable()
           
 ClassDescriptor getIterator()
           
 ClassDescriptor getKExtensionFunction(int parameterCount)
           
 ClassDescriptor getKFunction(int parameterCount)
           
 JetType getKFunctionType(java.util.List<AnnotationDescriptor> annotations, JetType receiverType, java.util.List<JetType> parameterTypes, JetType returnType, boolean extensionFunction)
           
 ClassDescriptor getKMemberFunction(int parameterCount)
           
 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()
           
 java.util.Set<ClassDescriptor> getNonPhysicalClasses()
          Classes that only exist for the Kotlin compiler: they are erased at runtime.
 ClassDescriptor getNothing()
           
 JetType getNothingType()
           
 JetType getNullableAnyType()
           
 JetType getNullableNothingType()
           
 JetType getNullablePrimitiveJetType(PrimitiveType primitiveType)
           
 ClassDescriptor getNumber()
           
 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()
           
 JetType getReceiverType(JetType type)
           
 JetType getReturnTypeFromFunctionType(JetType type)
           
 ClassDescriptor getSet()
           
 ClassDescriptor getShort()
           
 JetType getShortType()
           
 ClassDescriptor getString()
           
 JetType getStringType()
           
 ClassDescriptor getThrowable()
           
 ClassDescriptor getUnit()
           
 JetType getUnitType()
           
 java.util.List<ValueParameterDescriptor> getValueParameters(FunctionDescriptor functionDescriptor, JetType type)
           
 ClassDescriptor getVolatileAnnotationClass()
           
static void initialize(com.intellij.openapi.project.Project project, KotlinBuiltIns.InitializationMode initializationMode)
           
 boolean isAny(JetType type)
           
 boolean isArray(JetType type)
           
 boolean isData(ClassDescriptor classDescriptor)
           
 boolean isDeprecated(DeclarationDescriptor declarationDescriptor)
           
 boolean isExtensionFunctionType(JetType type)
           
 boolean isFunctionOrExtensionFunctionType(JetType type)
           
 boolean isFunctionType(JetType type)
           
 boolean isNothing(JetType type)
           
 boolean isNothingOrNullableNothing(JetType type)
           
 boolean isNullableNothing(JetType type)
           
 boolean isPrimitiveArray(JetType type)
           
 boolean isPrimitiveType(JetType type)
           
 boolean isUnit(JetType type)
           
 boolean isVolatile(PropertyDescriptor descriptor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STUB

public static final JetScope STUB

BUILT_INS_DIR

public static final java.lang.String BUILT_INS_DIR
See Also:
Constant Field Values

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

initialize

public static void initialize(@NotNull
                              com.intellij.openapi.project.Project project,
                              @NotNull
                              KotlinBuiltIns.InitializationMode initializationMode)

getInstance

@NotNull
public static KotlinBuiltIns getInstance()

getBuiltInsModule

@NotNull
public ModuleDescriptorImpl getBuiltInsModule()

getBuiltInsPackage

@NotNull
public NamespaceDescriptor getBuiltInsPackage()

getBuiltInsPackageFqName

@NotNull
public FqName getBuiltInsPackageFqName()

getBuiltInsScope

@NotNull
public JetScope getBuiltInsScope()

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)

getKFunction

@NotNull
public ClassDescriptor getKFunction(int parameterCount)

getKMemberFunction

@NotNull
public ClassDescriptor getKMemberFunction(int parameterCount)

getKExtensionFunction

@NotNull
public ClassDescriptor getKExtensionFunction(int parameterCount)

getThrowable

@NotNull
public ClassDescriptor getThrowable()

getDataClassAnnotation

@NotNull
public ClassDescriptor getDataClassAnnotation()

getVolatileAnnotationClass

@NotNull
public ClassDescriptor getVolatileAnnotationClass()

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

getNonPhysicalClasses

@NotNull
public java.util.Set<ClassDescriptor> getNonPhysicalClasses()
Classes that only exist for the Kotlin compiler: they are erased at runtime. As a consequence they, for example, shouldn't be referred to by other languages (e.g. Java).


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)

getArrayType

@NotNull
public JetType getArrayType(@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
                                       java.util.List<AnnotationDescriptor> annotations,
                                       @Nullable
                                       JetType receiverType,
                                       @NotNull
                                       java.util.List<JetType> parameterTypes,
                                       @NotNull
                                       JetType returnType)

getKFunctionType

@NotNull
public JetType getKFunctionType(@NotNull
                                        java.util.List<AnnotationDescriptor> annotations,
                                        @Nullable
                                        JetType receiverType,
                                        @NotNull
                                        java.util.List<JetType> parameterTypes,
                                        @NotNull
                                        JetType returnType,
                                        boolean extensionFunction)

isArray

public boolean isArray(@NotNull
                       JetType type)

isPrimitiveArray

public boolean isPrimitiveArray(@NotNull
                                JetType type)

isPrimitiveType

public boolean isPrimitiveType(@NotNull
                               JetType type)

isFunctionOrExtensionFunctionType

public boolean isFunctionOrExtensionFunctionType(@NotNull
                                                 JetType type)

isFunctionType

public boolean isFunctionType(@NotNull
                              JetType type)

isExtensionFunctionType

public boolean isExtensionFunctionType(@NotNull
                                       JetType type)

getReceiverType

@Nullable
public JetType getReceiverType(@NotNull
                                        JetType type)

getValueParameters

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

getReturnTypeFromFunctionType

@NotNull
public JetType getReturnTypeFromFunctionType(@NotNull
                                                     JetType type)

getParameterTypeProjectionsFromFunctionType

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

isNothing

public boolean isNothing(@NotNull
                         JetType type)

isNullableNothing

public boolean isNullableNothing(@NotNull
                                 JetType type)

isNothingOrNullableNothing

public boolean isNothingOrNullableNothing(@NotNull
                                          JetType type)

isAny

public boolean isAny(@NotNull
                     JetType type)

isUnit

public boolean isUnit(@NotNull
                      JetType type)

isData

public boolean isData(@NotNull
                      ClassDescriptor classDescriptor)

isDeprecated

public boolean isDeprecated(@NotNull
                            DeclarationDescriptor declarationDescriptor)

isVolatile

public boolean isVolatile(@NotNull
                          PropertyDescriptor descriptor)

getDefaultBound

@NotNull
public JetType getDefaultBound()