Class KotlinClassFlags
- All Implemented Interfaces:
KotlinFlags
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanDeprecated.booleanIndicates that the corresponding interface has at least one annotation in the JVM bytecode.booleanApplied to an interface compiled with -Xjvm-default=all or all-compatibility.booleanA class kind flag, signifying that the corresponding class is an `annotation class`.booleanA class kind flag, signifying that the corresponding class is a `companion object`.booleanApplied to an interface compiled with -Xjvm-default=all or all-compatibility.booleanSignifies that the corresponding class is `data`.booleanA class kind flag, signifying that the corresponding class is an `enum class`.booleanA class kind flag, signifying that the corresponding class is an enum entry.booleanSignifies that the corresponding class is `expect`.booleanSignifies that the corresponding class is `external`.booleanSignifies that the corresponding class is a functional interface, i.e.booleanSignifies that the corresponding class is `inner`.booleanA class kind flag, signifying that the corresponding class is an `interface`.booleanA class kind flag, signifying that the corresponding class is a non-companion `object`.booleanA class kind flag, signifying that the corresponding class is a usual `class`.booleanSignifies that the corresponding class is `value`.final KotlinModalityFlagsfinal KotlinVisibilityFlags -
Constructor Summary
ConstructorsConstructorDescriptionKotlinClassFlags(KotlinVisibilityFlags visibility, KotlinModalityFlags modality) -
Method Summary
-
Field Details
-
visibility
-
modality
-
isUsualClass
public boolean isUsualClassA class kind flag, signifying that the corresponding class is a usual `class`. -
isInterface
public boolean isInterfaceA class kind flag, signifying that the corresponding class is an `interface`. -
isEnumClass
public boolean isEnumClassA class kind flag, signifying that the corresponding class is an `enum class`. -
isEnumEntry
public boolean isEnumEntryA class kind flag, signifying that the corresponding class is an enum entry. -
isAnnotationClass
public boolean isAnnotationClassA class kind flag, signifying that the corresponding class is an `annotation class`. -
isObject
public boolean isObjectA class kind flag, signifying that the corresponding class is a non-companion `object`. -
isCompanionObject
public boolean isCompanionObjectA class kind flag, signifying that the corresponding class is a `companion object`. -
isInner
public boolean isInnerSignifies that the corresponding class is `inner`. -
isData
public boolean isDataSignifies that the corresponding class is `data`. -
isExternal
public boolean isExternalSignifies that the corresponding class is `external`. -
isExpect
public boolean isExpectSignifies that the corresponding class is `expect`. -
isValue
public boolean isValueSignifies that the corresponding class is `value`. -
isFun
public boolean isFunSignifies that the corresponding class is a functional interface, i.e. marked with the keyword `fun`. -
hasAnnotationsInBytecode
public boolean hasAnnotationsInBytecodeIndicates that the corresponding interface has at least one annotation in the JVM bytecode.Before annotations in metadata are enabled by default in the Kotlin compiler (https://youtrack.jetbrains.com/issue/KT-75736), annotations are only generated in the JVM bytecode. The compiler writes and reads this flag to metadata as an optimization, to avoid parsing class file one additional time when it's not needed.
Only annotations with [AnnotationRetention.BINARY] and [AnnotationRetention.RUNTIME] are written to the class files.
-
hasMethodBodiesInInterface
public boolean hasMethodBodiesInInterfaceApplied to an interface compiled with -Xjvm-default=all or all-compatibility.Without this flag or a `@JvmDefault` annotation on individual interface methods the Kotlin compiler moves all interface method bodies into a nested `DefaultImpls` class.
-
isCompiledInCompatibilityMode
public boolean isCompiledInCompatibilityModeApplied to an interface compiled with -Xjvm-default=all or all-compatibility.Without this flag or a `@JvmDefault` annotation on individual interface methods the Kotlin compiler moves all interface method bodies into a nested `DefaultImpls` class.
-
hasAnnotations
Deprecated.
-
-
Constructor Details
-
KotlinClassFlags
-