ClassInspector

interface ClassInspector

A basic interface for looking up JVM information about a given Class.

Inheritors

Properties

Link copied to clipboard

Indicates if this ClassInspector supports AnnotationRetention.RUNTIME-retained annotations. This is used to indicate if manual inference of certain non-RUNTIME-retained annotations should be done, such as JvmName.

Functions

Link copied to clipboard
fun ClassInspector.classFor(className: ClassName): KmClass

Looks up other classes, such as for nested members. Note that this class would always be Kotlin, so Metadata can be relied on for this.

Link copied to clipboard
abstract fun containerData(declarationContainer: KmDeclarationContainer, className: ClassName, parentClassName: ClassName?): ContainerData

Creates a new ContainerData instance for a given declarationContainer.

Link copied to clipboard
fun ClassInspector.containerData(className: ClassName, parentClassName: ClassName?): ContainerData

Creates a new ContainerData instance for a given className.

Link copied to clipboard
abstract fun declarationContainerFor(className: ClassName): KmDeclarationContainer

Looks up other declaration containers, such as for nested members. Note that this class would always be Kotlin, so Metadata can be relied on for this.

Link copied to clipboard
abstract fun enumEntry(enumClassName: ClassName, memberName: String): EnumEntryData

Looks up the enum entry on a given enum given its member name.

Link copied to clipboard
abstract fun isInterface(className: ClassName): Boolean

Looks up a class and returns whether or not it is an interface. Note that this class can be Java or Kotlin, so Metadata should not be relied on for this.

Link copied to clipboard
abstract fun methodExists(className: ClassName, methodSignature: JvmMethodSignature): Boolean

Looks up if a given methodSignature within className exists.