Type Name
abstract class TypeName
Content copied to clipboard
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
makeNonOptional
Link copied to clipboard
makeOptional
Link copied to clipboard
unwrapOptional
Link copied to clipboard
wrapOptional
Link copied to clipboard
Properties
Inheritors
ComposedTypeName
Link copied to clipboard
DeclaredTypeName
Link copied to clipboard
FunctionTypeName
Link copied to clipboard
ParameterizedTypeName
Link copied to clipboard
SelfTypeName
Link copied to clipboard
TupleTypeName
Link copied to clipboard
TypeVariableName
Link copied to clipboard