TypeSpec

class TypeSpec : Taggable, OriginatingElementsHolder

A generated class, interface, or enum declaration.

Types

Builder
Link copied to clipboard
Companion
Link copied to clipboard
object Companion
Kind
Link copied to clipboard
enum Kind : Enum<TypeSpec.Kind>

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
tag
Link copied to clipboard
open override fun <T : Any> tag(type: Class<T>): T?
Returns the tag attached with type as a key, or null if no tag is attached with that key.
open override fun <T : Any> tag(type: KClass<T>): T?
Returns the tag attached with type as a key, or null if no tag is attached with that key.
toBuilder
Link copied to clipboard
fun toBuilder(kind: TypeSpec.Kind = this.kind, name: String? = this.name): TypeSpec.Builder
toString
Link copied to clipboard
open override fun toString(): String

Properties

annotationSpecs
Link copied to clipboard
val annotationSpecs: List<AnnotationSpec>
enumConstants
Link copied to clipboard
val enumConstants: Map<String, TypeSpec>
funSpecs
Link copied to clipboard
val funSpecs: List<FunSpec>
initializerBlock
Link copied to clipboard
val initializerBlock: CodeBlock
initializerIndex
Link copied to clipboard
val initializerIndex: Int
isAnnotation
Link copied to clipboard
val isAnnotation: Boolean
isAnonymousClass
Link copied to clipboard
val isAnonymousClass: Boolean
isCompanion
Link copied to clipboard
val isCompanion: Boolean
isEnum
Link copied to clipboard
val isEnum: Boolean
isFunctionalInterface
Link copied to clipboard
val isFunctionalInterface: Boolean
kdoc
Link copied to clipboard
val kdoc: CodeBlock
kind
Link copied to clipboard
val kind: TypeSpec.Kind
modifiers
Link copied to clipboard
val modifiers: Set<KModifier>
name
Link copied to clipboard
val name: String?
originatingElements
Link copied to clipboard
open override val originatingElements: List<Element>
The originating elements of this type.
primaryConstructor
Link copied to clipboard
val primaryConstructor: FunSpec?
propertySpecs
Link copied to clipboard
val propertySpecs: List<PropertySpec>
superclass
Link copied to clipboard
val superclass: TypeName
superclassConstructorParameters
Link copied to clipboard
val superclassConstructorParameters: List<CodeBlock>
superinterfaces
Link copied to clipboard
val superinterfaces: Map<TypeName, CodeBlock?>
Map of superinterfaces - entries with a null value represent a regular superinterface (with no delegation), while non-null CodeBlock values represent delegates for the corresponding TypeSpec interface (key) value
tags
Link copied to clipboard
open override val tags: Map<KClass<*>, Any>
Returns all tags.
typeSpecs
Link copied to clipboard
val typeSpecs: List<TypeSpec>
typeVariables
Link copied to clipboard
val typeVariables: List<TypeVariableName>