Member Name
data class MemberName
Content copied to clipboard
Represents the name of a member (such as a function or a property).
Parameters
packageName
e.g. kotlin.collections
enclosingClassName
e.g. Map.Entry.Companion, if the member is declared inside the companion object of the Map.Entry class
simpleName
e.g. isBlank, size
isExtension
whether the member is an extension property or an extension function. Default is false.
If there is a member with the same name as this member in a local scope, the generated code will include this member's fully-qualified name to avoid ambiguity, e.g.:
package com.squareup.tacos
import kotlin.Unit
public class TacoTest {
public fun test(): Unit {
kotlin.error("errorText")
}
public fun error(): Unit {
}
}
However, since Kotlin compiler does not allow fully-qualified extension members, if isExtension is set to true for this MemberName, the generated code will include an import for this member and its simple name at the call site, e.g.:
package com.squareup.tacos
import kotlin.Unit
import kotlin.hashCode
public class TacoTest {
public override fun hashCode(): Unit {
var result = super.hashCode
if (result == 0) {
result = result * 37 + embedded_message.hashCode()
super.hashCode = result
}
return result
}
}
Constructors
MemberName
Link copied to clipboard
MemberName
Link copied to clipboard
fun MemberName(packageName: String, simpleName: String, isExtension: Boolean)
Content copied to clipboard
MemberName
Link copied to clipboard
MemberName
Link copied to clipboard
fun MemberName(enclosingClassName: ClassName, simpleName: String, isExtension: Boolean)
Content copied to clipboard
MemberName
Link copied to clipboard
MemberName
Link copied to clipboard
Types
Functions
Properties
canonicalName
Link copied to clipboard
enclosingClassName
Link copied to clipboard
isExtension
Link copied to clipboard
packageName
Link copied to clipboard
simpleName
Link copied to clipboard