docs/Classes/Variable.html
@objcMembers
public final class Variable : NSObject, SourceryModel, Typed, Annotated, Documented, Definition, Diffable
extension Variable: NSCoding
Defines variable
`
name
`
Variable name
Swift
public let name: String
`
typeName
`
Variable type name
Swift
public let typeName: TypeName
`
type
`
Variable type, if known, i.e. if the type is declared in the scanned sources. For explanation, see https://cdn.rawgit.com/krzysztofzablocki/Sourcery/master/docs/writing-templates.html#what-are-em-known-em-and-em-unknown-em-types
Swift
public var type: Type?
`
isComputed
`
Whether variable is computed and not stored
Swift
public let isComputed: Bool
`
isAsync
`
Whether variable is async
Swift
public let isAsync: Bool
`
throws
`
Whether variable throws
Swift
public let `throws`: Bool
`
throwsTypeName
`
Type of thrown error if specified
Swift
public let throwsTypeName: TypeName?
`
isStatic
`
Whether variable is static
Swift
public let isStatic: Bool
`
readAccess
`
Variable read access level, i.e. internal, private, fileprivate, public, open
Swift
public let readAccess: String
`
writeAccess
`
Variable write access, i.e. internal, private, fileprivate, public, open. For immutable variables this value is empty string
Swift
public let writeAccess: String
`
accessLevel
`
composed access level sourcery: skipJSExport
Swift
public var accessLevel: (read: AccessLevel, write: AccessLevel) { get }
`
isMutable
`
Whether variable is mutable or not
Swift
public var isMutable: Bool { get }
`
defaultValue
`
Variable default value expression
Swift
public var defaultValue: String?
`
annotations
`
Annotations, that were created with // sourcery: annotation1, other = “annotation value”, alterantive = 2
Swift
public var annotations: Annotations
`
documentation
`
Swift
public var documentation: Documentation
`
attributes
`
Variable attributes, i.e. @IBOutlet, @IBInspectable
Swift
public var attributes: AttributeList
`
modifiers
`
Modifiers, i.e. private
Swift
public var modifiers: [SourceryModifier]
`
isFinal
`
Whether variable is final or not
Swift
public var isFinal: Bool { get }
`
isLazy
`
Whether variable is lazy or not
Swift
public var isLazy: Bool { get }
`
isDynamic
`
Whether variable is dynamic or not
Swift
public var isDynamic: Bool { get }
`
definedInTypeName
`
Reference to type name where the variable is defined, nil if defined outside of any enum, struct, class etc
Swift
public internal(set) var definedInTypeName: TypeName? { get }
`
actualDefinedInTypeName
`
Reference to actual type name where the method is defined if declaration uses typealias, otherwise just a definedInTypeName
Swift
public var actualDefinedInTypeName: TypeName? { get }
`
definedInType
`
Reference to actual type where the object is defined, nil if defined outside of any enum, struct, class etc or type is unknown
Swift
public var definedInType: Type?
`
diffAgainst(_:)
`
Swift
public func diffAgainst(_ object: Any?) -> DiffableResult
`
isOptional
`
Whether type is optional. Shorthand for typeName.isOptional
Swift
public var isOptional: Bool { get }
`
isImplicitlyUnwrappedOptional
`
Whether type is implicitly unwrapped optional. Shorthand for typeName.isImplicitlyUnwrappedOptional
Swift
public var isImplicitlyUnwrappedOptional: Bool { get }
`
unwrappedTypeName
`
Type name without attributes and optional type information. Shorthand for typeName.unwrappedTypeName
Swift
public var unwrappedTypeName: String { get }
`
actualTypeName
`
Actual type name if declaration uses typealias, otherwise just a typeName. Shorthand for typeName.actualTypeName
Swift
public var actualTypeName: TypeName? { get }
`
isTuple
`
Whether type is a tuple. Shorthand for typeName.isTuple
Swift
public var isTuple: Bool { get }
`
isClosure
`
Whether type is a closure. Shorthand for typeName.isClosure
Swift
public var isClosure: Bool { get }
`
isArray
`
Whether type is an array. Shorthand for typeName.isArray
Swift
public var isArray: Bool { get }
`
isSet
`
Whether type is a set. Shorthand for typeName.isSet
Swift
public var isSet: Bool { get }
`
isDictionary
`
Whether type is a dictionary. Shorthand for typeName.isDictionary
Swift
public var isDictionary: Bool { get }
Copyright © 2016-2021 Pixle. All rights reserved.
Generated by jazzy ♪♫ v0.14.0, a Realm project.