FileSpec

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

Properties

Link copied to clipboard
open override val annotations: List<AnnotationSpec>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The relative path of the file which would be produced by a call to writeTo. This value always uses unix-style path separators (/).

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

Returns all tags.

Link copied to clipboard
open override val typeSpecs: List<TypeSpec>

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
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.

open override fun <T : Any> tag(type: <Error class: unknown class><T>): T?

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

Link copied to clipboard
inline 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.

Link copied to clipboard
fun toBuilder(packageName: String = this.packageName, name: String = this.name): FileSpec.Builder
Link copied to clipboard
fun toJavaFileObject(): <Error class: unknown class>
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun writeTo(out: <Error class: unknown class>)

fun writeTo(directory: <Error class: unknown class>): <Error class: unknown class>

Writes this to directory as UTF-8 using the standard directory structure and returns the newly output file.

fun writeTo(filer: <Error class: unknown class>)

Writes this to filer.

fun writeTo(directory: <Error class: unknown class>): <Error class: unknown class>

Writes this to directory as UTF-8 using the standard directory structure and returns the newly output path.