kotlinpoet / com.squareup.kotlinpoet / Taggable

Taggable

interface Taggable

A type that can be tagged with extra metadata of the user's choice.

Types

Builder

interface Builder<out T : Taggable.Builder<T>>

The builder analogue to Taggable types.

Functions

tag

open fun <T : Any> tag(type: Class<T>): T?
abstract 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.

Extension Functions

tag

fun <T : Any> Taggable.tag(): T?

Returns the tag attached with T as a key, or null if no tag is attached with that key.

Inheritors

AnnotationSpec

class AnnotationSpec : Taggable

A generated annotation on a declaration.

FileSpec

class FileSpec : Taggable

A Kotlin file containing top level objects like classes, objects, functions, properties, and type aliases.

FunSpec

class FunSpec : Taggable, OriginatingElementsHolder

A generated function declaration.

ParameterSpec

class ParameterSpec : Taggable

A generated parameter declaration.

PropertySpec

class PropertySpec : Taggable, OriginatingElementsHolder

A generated property declaration.

TypeAliasSpec

class TypeAliasSpec : Taggable

A generated typealias declaration

TypeSpec

class TypeSpec : Taggable, OriginatingElementsHolder

A generated class, interface, or enum declaration.