swiftpoet / io.outfoxx.swiftpoet / FileSpec

FileSpec

class FileSpec

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

Items are output in the following order:

Types

Builder

class Builder

Properties

comment

val comment: CodeBlock

members

val members: List<FileMemberSpec>

moduleName

val moduleName: String

name

val name: String

Functions

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

toBuilder

fun toBuilder(): Builder

toString

fun toString(): String

writeTo

fun writeTo(out: Appendable): Unit

Writes this to directory as UTF-8 using the standard directory structure.

fun writeTo(directory: Path): Unit
fun writeTo(directory: File): Unit

Companion Object Functions

builder

fun builder(moduleName: String, fileName: String): Builder
fun builder(fileName: String): Builder

get

fun get(moduleName: String, typeSpec: AnyTypeSpec): FileSpec