Back to Sourcery

Type

docs/Classes/Type.html

2.3.010.3 KB
Original Source

Type

@objcMembers
public class Type : NSObject, SourceryModel, Annotated, Documented, Diffable
extension Type: NSCoding

Defines Swift type

`

                imports
                `

Imports that existed in the file that contained this type declaration

Declaration

Swift

public var imports: [Import]

`

                allImports
                `

Imports existed in all files containing this type and all its super classes/protocols

Declaration

Swift

public var allImports: [Import] { get }

`

                isExtension
                `

Whether declaration is an extension of some type

Declaration

Swift

public var isExtension: Bool

`

                kind
                `

Kind of type declaration, i.e. enum, struct, class, protocol or extension

Declaration

Swift

public var kind: String { get }

`

                accessLevel
                `

Type access level, i.e. internal, private, fileprivate, public, open

Declaration

Swift

public let accessLevel: String

`

                name
                `

Type name in global scope. For inner types includes the name of its containing type, i.e. Type.Inner

Declaration

Swift

public var name: String { get }

`

                isUnknownExtension
                `

Whether the type has been resolved as unknown extension

Declaration

Swift

public var isUnknownExtension: Bool

`

                globalName
                `

Global type name including module name, unless it’s an extension of unknown type

Declaration

Swift

public var globalName: String { get }

`

                isGeneric
                `

Whether type is generic

Declaration

Swift

public var isGeneric: Bool

`

                localName
                `

Type name in its own scope.

Declaration

Swift

public var localName: String

`

                variables
                `

Variables defined in this type only, inluding variables defined in its extensions, but not including variables inherited from superclasses (for classes only) and protocols

Declaration

Swift

public var variables: [Variable] { get }

`

                rawVariables
                `

Unfiltered (can contain duplications from extensions) variables defined in this type only, inluding variables defined in its extensions, but not including variables inherited from superclasses (for classes only) and protocols

Declaration

Swift

public var rawVariables: [Variable]

`

                allVariables
                `

All variables defined for this type, including variables defined in extensions, in superclasses (for classes only) and protocols

Declaration

Swift

public var allVariables: [Variable] { get }

`

                methods
                `

Methods defined in this type only, inluding methods defined in its extensions, but not including methods inherited from superclasses (for classes only) and protocols

Declaration

Swift

public var methods: [Method] { get }

`

                rawMethods
                `

Unfiltered (can contain duplications from extensions) methods defined in this type only, inluding methods defined in its extensions, but not including methods inherited from superclasses (for classes only) and protocols

Declaration

Swift

public var rawMethods: [Method]

`

                allMethods
                `

All methods defined for this type, including methods defined in extensions, in superclasses (for classes only) and protocols

Declaration

Swift

public var allMethods: [Method] { get }

`

                subscripts
                `

Subscripts defined in this type only, inluding subscripts defined in its extensions, but not including subscripts inherited from superclasses (for classes only) and protocols

Declaration

Swift

public var subscripts: [Subscript] { get }

`

                rawSubscripts
                `

Unfiltered (can contain duplications from extensions) Subscripts defined in this type only, inluding subscripts defined in its extensions, but not including subscripts inherited from superclasses (for classes only) and protocols

Declaration

Swift

public var rawSubscripts: [Subscript]

`

                allSubscripts
                `

All subscripts defined for this type, including subscripts defined in extensions, in superclasses (for classes only) and protocols

Declaration

Swift

public var allSubscripts: [Subscript] { get }

`

                bodyBytesRange
                `

Bytes position of the body of this type in its declaration file if available.

Declaration

Swift

public var bodyBytesRange: BytesRange?

`

                completeDeclarationRange
                `

Bytes position of the whole declaration of this type in its declaration file if available.

Declaration

Swift

public var completeDeclarationRange: BytesRange?

`

                initializers
                `

All initializers defined in this type

Declaration

Swift

public var initializers: [Method] { get }

`

                annotations
                `

All annotations for this type

Declaration

Swift

public var annotations: Annotations

`

                documentation
                `

Declaration

Swift

public var documentation: Documentation

`

                staticVariables
                `

Static variables defined in this type

Declaration

Swift

public var staticVariables: [Variable] { get }

`

                staticMethods
                `

Static methods defined in this type

Declaration

Swift

public var staticMethods: [Method] { get }

`

                classMethods
                `

Class methods defined in this type

Declaration

Swift

public var classMethods: [Method] { get }

`

                instanceVariables
                `

Instance variables defined in this type

Declaration

Swift

public var instanceVariables: [Variable] { get }

`

                instanceMethods
                `

Instance methods defined in this type

Declaration

Swift

public var instanceMethods: [Method] { get }

`

                computedVariables
                `

Computed instance variables defined in this type

Declaration

Swift

public var computedVariables: [Variable] { get }

`

                storedVariables
                `

Stored instance variables defined in this type

Declaration

Swift

public var storedVariables: [Variable] { get }

`

                inheritedTypes
                `

Names of types this type inherits from (for classes only) and protocols it implements, in order of definition

Declaration

Swift

public var inheritedTypes: [String] { get set }

`

                based
                `

Names of types or protocols this type inherits from, including unknown (not scanned) types

Declaration

Swift

public var based: [String : String]

`

                basedTypes
                `

Types this type inherits from or implements, including unknown (not scanned) types with extensions defined

Declaration

Swift

public var basedTypes: [String : Type]

`

                inherits
                `

Types this type inherits from

Declaration

Swift

public var inherits: [String : Type]

`

                implements
                `

Protocols this type implements. Does not contain classes in case where composition (&) is used in the declaration

Declaration

Swift

public var implements: [String : Type]

`

                containedTypes
                `

Contained types

Declaration

Swift

public var containedTypes: [Type] { get set }

`

                containedType
                `

Contained types groupd by their names

Declaration

Swift

public private(set) var containedType: [String : Type] { get }

`

                parentName
                `

Name of parent type (for contained types only)

Declaration

Swift

public private(set) var parentName: String? { get }

`

                parent
                `

Parent type, if known (for contained types only)

Declaration

Swift

public var parent: Type? { get set }

`

                supertype
                `

Superclass type, if known (only for classes)

Declaration

Swift

public var supertype: Type?

`

                attributes
                `

Type attributes, i.e. @objc

Declaration

Swift

public var attributes: AttributeList

`

                modifiers
                `

Type modifiers, i.e. private, final

Declaration

Swift

public var modifiers: [SourceryModifier]

`

                path
                `

Path to file where the type is defined

Declaration

Swift

public var path: String? { get set }

`

                directory
                `

Directory to file where the type is defined

Declaration

Swift

public var directory: String? { get }

`

                genericRequirements
                `

list of generic requirements

Declaration

Swift

public var genericRequirements: [GenericRequirement] { get set }

`

                fileName
                `

File name where the type was defined

Declaration

Swift

public var fileName: String?

`

                diffAgainst(_:)
                `

Declaration

Swift

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

Copyright © 2016-2021 Pixle. All rights reserved.

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