Functions

Link copied to clipboard
fun addAnnotation(annotationSpec: AnnotationSpec): PropertySpec.Builder
fun addAnnotation(annotation: ClassName): PropertySpec.Builder
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
fun addAnnotation(annotation: Class<*>): PropertySpec.Builder
fun addAnnotation(annotation: KClass<*>): PropertySpec.Builder
Link copied to clipboard
fun addAnnotations(annotationSpecs: Iterable<AnnotationSpec>): PropertySpec.Builder
Link copied to clipboard
fun addKdoc(block: CodeBlock): PropertySpec.Builder
fun addKdoc(format: String, vararg args: Any): PropertySpec.Builder
Link copied to clipboard
fun addModifiers(vararg modifiers: KModifier): PropertySpec.Builder
fun addModifiers(modifiers: Iterable<KModifier>): PropertySpec.Builder
Link copied to clipboard
open fun addOriginatingElement(originatingElement: Element): PropertySpec.Builder

Adds an originatingElement to this type's list of originating elements.

Link copied to clipboard
fun addTypeVariable(typeVariable: TypeVariableName): PropertySpec.Builder
Link copied to clipboard
fun addTypeVariables(typeVariables: Iterable<TypeVariableName>): PropertySpec.Builder
Link copied to clipboard
fun build(): PropertySpec
Link copied to clipboard
fun contextReceivers(vararg receiverType: TypeName): PropertySpec.Builder
fun contextReceivers(receiverTypes: Iterable<TypeName>): PropertySpec.Builder
Link copied to clipboard
fun delegate(codeBlock: CodeBlock): PropertySpec.Builder
fun delegate(format: String, vararg args: Any?): PropertySpec.Builder
Link copied to clipboard
fun getter(getter: FunSpec?): PropertySpec.Builder
Link copied to clipboard
fun initializer(codeBlock: CodeBlock?): PropertySpec.Builder
fun initializer(format: String, vararg args: Any?): PropertySpec.Builder
Link copied to clipboard
fun mutable(mutable: Boolean = true): PropertySpec.Builder

True to create a var instead of a val.

Link copied to clipboard
fun receiver(receiverType: TypeName?): PropertySpec.Builder
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
fun receiver(receiverType: Type): PropertySpec.Builder
fun receiver(receiverType: KClass<*>): PropertySpec.Builder
Link copied to clipboard
fun setter(setter: FunSpec?): PropertySpec.Builder
Link copied to clipboard
open fun tag(type: Class<*>, tag: Any?): PropertySpec.Builder
open fun tag(type: KClass<*>, tag: Any?): PropertySpec.Builder

Attaches tag to the request using type as a key. Tags can be read from a request using Taggable.tag. Use null to remove any existing tag assigned for type.

Properties

Link copied to clipboard
val annotations: MutableList<AnnotationSpec>
Link copied to clipboard
val modifiers: MutableList<KModifier>
Link copied to clipboard
open override val originatingElements: MutableList<Element>

Mutable map of the current originating elements this builder contains.

Link copied to clipboard
open override val tags: MutableMap<KClass<*>, Any>

Mutable map of the current tags this builder contains.

Link copied to clipboard
val typeVariables: MutableList<TypeVariableName>

Extensions

Link copied to clipboard
fun PropertySpec.Builder.jvmField(): PropertySpec.Builder
Link copied to clipboard
fun PropertySpec.Builder.jvmStatic(): PropertySpec.Builder
Link copied to clipboard
fun PropertySpec.Builder.jvmSuppressWildcards(suppress: Boolean = true): PropertySpec.Builder
Link copied to clipboard
inline fun <T : Any> PropertySpec.Builder.tag(tag: T?): PropertySpec.Builder

Attaches tag to the request using T as a key. Tags can be read from a request using Taggable.tag. Use null to remove any existing tag assigned for T.

Link copied to clipboard
fun PropertySpec.Builder.transient(): PropertySpec.Builder
Link copied to clipboard
fun PropertySpec.Builder.volatile(): PropertySpec.Builder