ClassInspectorUtil

object ClassInspectorUtil

Functions

codeLiteralOf
Link copied to clipboard
fun codeLiteralOf(literal: Any): CodeBlock
computeIsJvmField
Link copied to clipboard
fun computeIsJvmField(property: ImmutableKmProperty, classInspector: ClassInspector, isCompanionObject: Boolean, hasGetter: Boolean, hasSetter: Boolean, hasField: Boolean): Boolean
Infers if property is a jvm field and should be annotated as such given the input parameters.
createAnnotations
Link copied to clipboard
fun createAnnotations(siteTarget: AnnotationSpec.UseSiteTarget? = null, body: MutableCollection<AnnotationSpec>.() -> Unit): Collection<AnnotationSpec>
createClassName
Link copied to clipboard
fun createClassName(kotlinMetadataName: String): ClassName
Best guesses a ClassName as represented in Metadata's kotlinx.metadata.ClassName, where package names in this name are separated by '/' and class names are separated by '.'.
createThrowsSpec
Link copied to clipboard
fun createThrowsSpec(exceptions: Collection<TypeName>, useSiteTarget: AnnotationSpec.UseSiteTarget? = null): AnnotationSpec
filterOutNullabilityAnnotations
Link copied to clipboard
fun filterOutNullabilityAnnotations(annotations: List<AnnotationSpec>): List<AnnotationSpec>
toTreeSet
Link copied to clipboard
fun Iterable<AnnotationSpec>.toTreeSet(): TreeSet<AnnotationSpec>

Properties

JVM_NAME
Link copied to clipboard
val JVM_NAME: ClassName
KOTLIN_INTRINSIC_INTERFACES
Link copied to clipboard
val KOTLIN_INTRINSIC_INTERFACES: Set<ClassName>