TypeName

abstract class TypeName

Any type in Swift's type system. This class identifies simple types like Int and String, composite types like Optional<String> and Set<String>, and unassignable types like Void.

Type names are dumb identifiers only and do not model the values they name. For example, the type name for Swift.Array doesn't know about the count property, the fact that arrays are collections, or even that it accepts a single type parameter.

Instances of this class are immutable value objects that implement equals() and hashCode() properly.

Defining new types

------------------

Create new reference types like MyModule.HelloWorld with DeclaredTypeName.typeName. To build composite types like Set<Long>, use the factory methods on ParameterizedTypeName and TypeVariableName.

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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
open val implicit: Boolean = false
Link copied to clipboard
open val name: String
Link copied to clipboard
open val optional: Boolean = false

Inheritors

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