Types

@objcMembers
public final class Types : NSObject, SourceryModel, Diffable
extension Types: NSCoding

Collection of scanned types for accessing in templates

  • All known typealiases

    Declaration

    Swift

    public let typealiases: [Typealias]
  • Declaration

    Swift

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

    Swift

    public override var hash: Int { get }
  • all

    All known types, excluding protocols or protocol compositions.

    Declaration

    Swift

    public lazy internal(set) var all: [Type] { get set }
  • All known protocols

    Declaration

    Swift

    public lazy internal(set) var protocols: [Protocol] { get set }
  • All known protocol compositions

    Declaration

    Swift

    public lazy internal(set) var protocolCompositions: [ProtocolComposition] { get set }
  • All known classes

    Declaration

    Swift

    public lazy internal(set) var classes: [Class] { get set }
  • All known structs

    Declaration

    Swift

    public lazy internal(set) var structs: [Struct] { get set }
  • All known enums

    Declaration

    Swift

    public lazy internal(set) var enums: [Enum] { get set }
  • All known extensions

    Declaration

    Swift

    public lazy internal(set) var extensions: [Type] { get set }
  • Types based on any other type, grouped by its name, even if they are not known. types.based.MyType returns list of types based on MyType

    Declaration

    Swift

    public lazy internal(set) var based: TypesCollection { get set }
  • Classes inheriting from any known class, grouped by its name. types.inheriting.MyClass returns list of types inheriting from MyClass

    Declaration

    Swift

    public lazy internal(set) var inheriting: TypesCollection { get set }
  • Types implementing known protocol, grouped by its name. types.implementing.MyProtocol returns list of types implementing MyProtocol

    Declaration

    Swift

    public lazy internal(set) var implementing: TypesCollection { get set }