FileSpec

class FileSpec : Taggable

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

Items are output in the following order:

  • Comment

  • Annotations

  • Package

  • Imports

  • Members

Types

Builder
Link copied to clipboard
class Builder : Taggable.Builder<FileSpec.Builder>
Companion
Link copied to clipboard
object Companion

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
inline 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.
inline 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(): FileSpec.Builder
toString
Link copied to clipboard
open override fun toString(): String
writeTo
Link copied to clipboard
fun writeTo(directory: File)
Writes this to directory as UTF-8 using the standard directory structure.
fun writeTo(out: Appendable)
fun writeTo(directory: Path)
Writes this to directory as UTF-8 using the standard directory structure.

Properties

comment
Link copied to clipboard
val comment: CodeBlock
members
Link copied to clipboard
val members: List<FileMemberSpec>
moduleName
Link copied to clipboard
val moduleName: String
name
Link copied to clipboard
val name: String
tags
Link copied to clipboard
val tags: Map<KClass<*>, Any>
all tags.