class DeclaredTypeName : TypeName, Comparable<DeclaredTypeName>
A fully-qualified type name for top-level and member types.
<init> |
Returns a type name created from the given parts. For example, calling this with module name
DeclaredTypeName(moduleName: String, simpleName: String, vararg simpleNames: String) |
canonicalName |
val canonicalName: String |
compoundName |
val compoundName: String |
moduleName |
Module name, like val moduleName: String |
simpleName |
Simple name of this type, like val simpleName: String |
simpleNames |
val simpleNames: List<String> |
compareTo |
fun compareTo(other: DeclaredTypeName): Int |
enclosingTypeName |
Returns the enclosing type, like Map for fun enclosingTypeName(): DeclaredTypeName? |
nestedType |
Returns a new DeclaredTypeName instance for the specified fun nestedType(name: String): DeclaredTypeName |
peerType |
Returns a type that shares the same enclosing package or type. If this type is enclosed by
another type, this is equivalent to fun peerType(name: String): DeclaredTypeName |
topLevelTypeName |
Returns the top type in this nesting group. Equivalent to chained calls to DeclaredTypeName.enclosingTypeName until the result's enclosing type is null. fun topLevelTypeName(): DeclaredTypeName |
typeName |
fun typeName(qualifiedTypeName: String): DeclaredTypeName |
parameterizedBy |
fun DeclaredTypeName.parameterizedBy(vararg typeArguments: TypeName): ParameterizedTypeName |