Back to Sourcery

TypeName

docs/Classes/TypeName.html

2.3.04.8 KB
Original Source

TypeName

@objcMembers
public final class TypeName : NSObject, SourceryModelWithoutDescription, LosslessStringConvertible, Diffable
extension TypeName: NSCoding

Describes name of the type used in typed declaration (variable, method parameter or return value etc.)

`

                name
                `

Type name used in declaration

Declaration

Swift

public var name: String

`

                generic
                `

The generics of this TypeName

Declaration

Swift

public var generic: GenericType?

`

                isGeneric
                `

Whether this TypeName is generic

Declaration

Swift

public var isGeneric: Bool { get }

`

                isProtocolComposition
                `

Whether this TypeName is protocol composition

Declaration

Swift

public var isProtocolComposition: Bool

`

                actualTypeName
                `

Actual type name if given type name is a typealias

Declaration

Swift

public var actualTypeName: TypeName?

`

                attributes
                `

Type name attributes, i.e. @escaping

Declaration

Swift

public var attributes: AttributeList

`

                modifiers
                `

Modifiers, i.e. escaping

Declaration

Swift

public var modifiers: [SourceryModifier]

`

                isOptional
                `

Whether type is optional

Declaration

Swift

public let isOptional: Bool

`

                isImplicitlyUnwrappedOptional
                `

Whether type is implicitly unwrapped optional

Declaration

Swift

public let isImplicitlyUnwrappedOptional: Bool

`

                unwrappedTypeName
                `

Type name without attributes and optional type information

Declaration

Swift

public var unwrappedTypeName: String

`

                isVoid
                `

Whether type is void (Void or ())

Declaration

Swift

public var isVoid: Bool { get }

`

                isTuple
                `

Whether type is a tuple

Declaration

Swift

public var isTuple: Bool { get }

`

                tuple
                `

Tuple type data

Declaration

Swift

public var tuple: TupleType?

`

                isArray
                `

Whether type is an array

Declaration

Swift

public var isArray: Bool { get }

`

                array
                `

Array type data

Declaration

Swift

public var array: ArrayType?

`

                isDictionary
                `

Whether type is a dictionary

Declaration

Swift

public var isDictionary: Bool { get }

`

                dictionary
                `

Dictionary type data

Declaration

Swift

public var dictionary: DictionaryType?

`

                isClosure
                `

Whether type is a closure

Declaration

Swift

public var isClosure: Bool { get }

`

                closure
                `

Closure type data

Declaration

Swift

public var closure: ClosureType?

`

                isSet
                `

Whether type is a Set

Declaration

Swift

public var isSet: Bool { get }

`

                set
                `

Set type data

Declaration

Swift

public var set: SetType?

`

                isNever
                `

Whether type is Never

Declaration

Swift

public var isNever: Bool { get }

`

                asSource
                `

Prints typename as it would appear on definition

Declaration

Swift

public var asSource: String { get }

`

                description
                `

Declaration

Swift

public override var description: String { get }

`

                diffAgainst(_:)
                `

Declaration

Swift

public func diffAgainst(_ object: Any?) -> DiffableResult

`

                hash
                `

Declaration

Swift

public override var hash: Int { get }

`

                init(_:)
                `

Declaration

Swift

public convenience init(_ description: String)

`

                unknown(description:attributes:)
                `

Declaration

Swift

public static func unknown(description: String?, attributes: AttributeList = [:]) -> TypeName

Copyright © 2016-2021 Pixle. All rights reserved.

Generated by jazzy ♪♫ v0.14.0, a Realm project.