ClassInspector

interface ClassInspector

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

Functions

containerData
Link copied to clipboard
abstract fun containerData(declarationContainer: ImmutableKmDeclarationContainer, className: ClassName, parentClassName: ClassName?): ContainerData
Creates a new ContainerData instance for a given declarationContainer.
declarationContainerFor
Link copied to clipboard
abstract fun declarationContainerFor(className: ClassName): ImmutableKmDeclarationContainer
Looks up other declaration containers, such as for nested members.
enumEntry
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.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
isInterface
Link copied to clipboard
abstract fun isInterface(className: ClassName): Boolean
Looks up a class and returns whether or not it is an interface.
methodExists
Link copied to clipboard
abstract fun methodExists(className: ClassName, methodSignature: JvmMethodSignature): Boolean
Looks up if a given methodSignature within className exists.
toString
Link copied to clipboard
open fun toString(): String

Properties

supportsNonRuntimeRetainedAnnotations
Link copied to clipboard
abstract val supportsNonRuntimeRetainedAnnotations: Boolean
Indicates if this ClassInspector supports AnnotationRetention.RUNTIME-retained annotations.

Extensions

classFor
Link copied to clipboard
fun ClassInspector.classFor(className: ClassName): ImmutableKmClass
Looks up other classes, such as for nested members.
containerData
Link copied to clipboard
fun ClassInspector.containerData(className: ClassName, parentClassName: ClassName?): ContainerData
Creates a new ContainerData instance for a given className.