org.jetbrains.kotlin.builtins
Class KotlinBuiltIns
java.lang.Object
org.jetbrains.kotlin.builtins.KotlinBuiltIns
public class KotlinBuiltIns
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
ANNOTATION_PACKAGE_FQ_NAME
public static final FqName ANNOTATION_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
getInstance
@NotNull
public static KotlinBuiltIns getInstance()
getBuiltInsModule
@NotNull
public ModuleDescriptorImpl getBuiltInsModule()
getBuiltInsPackageFragment
@NotNull
public PackageFragmentDescriptor getBuiltInsPackageFragment()
getBuiltInsPackageScope
@NotNull
public JetScope getBuiltInsPackageScope()
getAnnotationPackageScope
@NotNull
public JetScope getAnnotationPackageScope()
getAnnotationClassByName
@NotNull
public ClassDescriptor getAnnotationClassByName(@NotNull
Name simpleName)
getBuiltInClassByName
@NotNull
public ClassDescriptor getBuiltInClassByName(@NotNull
Name simpleName)
getBuiltInClassByNameNullable
@Nullable
public ClassDescriptor getBuiltInClassByNameNullable(@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
@Deprecated
@NotNull
public ClassDescriptor getExtensionFunction(int parameterCount)
- Deprecated. there are no ExtensionFunction classes anymore, use
getFunction(int)
instead
- Returns:
- the descriptor representing the class kotlin.Function{parameterCount + 1}
getThrowable
@NotNull
public ClassDescriptor getThrowable()
getCloneable
@NotNull
public ClassDescriptor getCloneable()
getDeprecatedAnnotation
@NotNull
public ClassDescriptor getDeprecatedAnnotation()
getTargetAnnotation
@NotNull
public ClassDescriptor getTargetAnnotation()
getRetentionAnnotation
@NotNull
public ClassDescriptor getRetentionAnnotation()
getRepeatableAnnotation
@NotNull
public ClassDescriptor getRepeatableAnnotation()
getMustBeDocumentedAnnotation
@NotNull
public ClassDescriptor getMustBeDocumentedAnnotation()
getAnnotationTargetEnum
@NotNull
public ClassDescriptor getAnnotationTargetEnum()
getAnnotationTargetEnumEntry
@Nullable
public ClassDescriptor getAnnotationTargetEnumEntry(@NotNull
KotlinTarget target)
getAnnotationRetentionEnum
@NotNull
public ClassDescriptor getAnnotationRetentionEnum()
getAnnotationRetentionEnumEntry
@Nullable
public ClassDescriptor getAnnotationRetentionEnumEntry(@NotNull
KotlinRetention retention)
getAnnotationAnnotation
@NotNull
public ClassDescriptor getAnnotationAnnotation()
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)
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
getPrimitiveTypeByFqName
@Nullable
public static PrimitiveType getPrimitiveTypeByFqName(@NotNull
FqNameUnsafe primitiveClassFqName)
getPrimitiveTypeByArrayClassFqName
@Nullable
public static PrimitiveType getPrimitiveTypeByArrayClassFqName(@NotNull
FqNameUnsafe primitiveArrayClassFqName)
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()
createExtensionAnnotation
@NotNull
public AnnotationDescriptor createExtensionAnnotation()
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)
isPrimitiveClass
public static boolean isPrimitiveClass(@NotNull
ClassDescriptor descriptor)
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)
isNumberedFunctionClassFqName
public static boolean isNumberedFunctionClassFqName(@NotNull
FqNameUnsafe fqName)
- Returns:
- true if this is an FQ name of a fictitious class representing the function type,
e.g. kotlin.Function1 (but NOT kotlin.reflect.KFunction1)
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)
isBoolean
public static boolean isBoolean(@NotNull
JetType type)
isBooleanOrNullableBoolean
public static boolean isBooleanOrNullableBoolean(@NotNull
JetType type)
isBoolean
public static boolean isBoolean(@NotNull
ClassDescriptor classDescriptor)
isChar
public static boolean isChar(@NotNull
JetType type)
isInt
public static boolean isInt(@NotNull
JetType type)
isByte
public static boolean isByte(@NotNull
JetType type)
isLong
public static boolean isLong(@NotNull
JetType type)
isShort
public static boolean isShort(@NotNull
JetType type)
isFloat
public static boolean isFloat(@NotNull
JetType type)
isDouble
public static boolean isDouble(@NotNull
JetType type)
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)
isDefaultBound
public static boolean isDefaultBound(@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)
isCollectionOrNullableCollection
public static boolean isCollectionOrNullableCollection(@NotNull
JetType type)
isListOrNullableList
public static boolean isListOrNullableList(@NotNull
JetType type)
isSetOrNullableSet
public static boolean isSetOrNullableSet(@NotNull
JetType type)
isIterableOrNullableIterable
public static boolean isIterableOrNullableIterable(@NotNull
JetType type)
isKClass
public static boolean isKClass(@NotNull
ClassDescriptor descriptor)
isNonPrimitiveArray
public static boolean isNonPrimitiveArray(@NotNull
ClassDescriptor descriptor)
isAnnotation
public static boolean isAnnotation(@NotNull
ClassDescriptor descriptor)
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)
isNoinline
public static boolean isNoinline(@NotNull
DeclarationDescriptor descriptor)
- Checks that the symbol represented by the descriptor is annotated with the
kotlin.noinline
annotation
isSuppressAnnotation
public static boolean isSuppressAnnotation(@NotNull
AnnotationDescriptor annotationDescriptor)
getDefaultBound
@NotNull
public JetType getDefaultBound()
getIdentityEquals
@NotNull
public FunctionDescriptor getIdentityEquals()