Class KotlinClassFlags

  • All Implemented Interfaces:
    KotlinFlags

    public class KotlinClassFlags
    extends java.lang.Object
    implements KotlinFlags
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean hasAnnotations
      Deprecated.
      boolean hasAnnotationsInBytecode
      Indicates that the corresponding interface has at least one annotation in the JVM bytecode.
      boolean hasMethodBodiesInInterface
      Applied to an interface compiled with -Xjvm-default=all or all-compatibility.
      boolean isAnnotationClass
      A class kind flag, signifying that the corresponding class is an `annotation class`.
      boolean isCompanionObject
      A class kind flag, signifying that the corresponding class is a `companion object`.
      boolean isCompiledInCompatibilityMode
      Applied to an interface compiled with -Xjvm-default=all or all-compatibility.
      boolean isData
      Signifies that the corresponding class is `data`.
      boolean isEnumClass
      A class kind flag, signifying that the corresponding class is an `enum class`.
      boolean isEnumEntry
      A class kind flag, signifying that the corresponding class is an enum entry.
      boolean isExpect
      Signifies that the corresponding class is `expect`.
      boolean isExternal
      Signifies that the corresponding class is `external`.
      boolean isFun
      Signifies that the corresponding class is a functional interface, i.e.
      boolean isInner
      Signifies that the corresponding class is `inner`.
      boolean isInterface
      A class kind flag, signifying that the corresponding class is an `interface`.
      boolean isObject
      A class kind flag, signifying that the corresponding class is a non-companion `object`.
      boolean isUsualClass
      A class kind flag, signifying that the corresponding class is a usual `class`.
      boolean isValue
      Signifies that the corresponding class is `value`.
      KotlinModalityFlags modality  
      KotlinVisibilityFlags visibility  
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • isUsualClass

        public boolean isUsualClass
        A class kind flag, signifying that the corresponding class is a usual `class`.
      • isInterface

        public boolean isInterface
        A class kind flag, signifying that the corresponding class is an `interface`.
      • isEnumClass

        public boolean isEnumClass
        A class kind flag, signifying that the corresponding class is an `enum class`.
      • isEnumEntry

        public boolean isEnumEntry
        A class kind flag, signifying that the corresponding class is an enum entry.
      • isAnnotationClass

        public boolean isAnnotationClass
        A class kind flag, signifying that the corresponding class is an `annotation class`.
      • isObject

        public boolean isObject
        A class kind flag, signifying that the corresponding class is a non-companion `object`.
      • isCompanionObject

        public boolean isCompanionObject
        A class kind flag, signifying that the corresponding class is a `companion object`.
      • isInner

        public boolean isInner
        Signifies that the corresponding class is `inner`.
      • isData

        public boolean isData
        Signifies that the corresponding class is `data`.
      • isExternal

        public boolean isExternal
        Signifies that the corresponding class is `external`.
      • isExpect

        public boolean isExpect
        Signifies that the corresponding class is `expect`.
      • isValue

        public boolean isValue
        Signifies that the corresponding class is `value`.
      • isFun

        public boolean isFun
        Signifies that the corresponding class is a functional interface, i.e. marked with the keyword `fun`.
      • hasAnnotationsInBytecode

        public boolean hasAnnotationsInBytecode
        Indicates 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 hasMethodBodiesInInterface
        Applied 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 isCompiledInCompatibilityMode
        Applied 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
        public boolean hasAnnotations
        Deprecated.