docs/Classes/Subscript.html
@objcMembers
public final class Subscript : NSObject, SourceryModel, Annotated, Documented, Definition, Diffable
extension Subscript: NSCoding
Describes subscript
`
parameters
`
Method parameters
Swift
public var parameters: [MethodParameter]
`
returnTypeName
`
Return value type name used in declaration, including generic constraints, i.e. where T: Equatable
Swift
public var returnTypeName: TypeName
`
actualReturnTypeName
`
Actual return value type name if declaration uses typealias, otherwise just a returnTypeName
Swift
public var actualReturnTypeName: TypeName { get }
`
returnType
`
Actual return value type, if known
Swift
public var returnType: Type?
`
isOptionalReturnType
`
Whether return value type is optional
Swift
public var isOptionalReturnType: Bool { get }
`
isImplicitlyUnwrappedOptionalReturnType
`
Whether return value type is implicitly unwrapped optional
Swift
public var isImplicitlyUnwrappedOptionalReturnType: Bool { get }
`
unwrappedReturnTypeName
`
Return value type name without attributes and optional type information
Swift
public var unwrappedReturnTypeName: String { get }
`
isFinal
`
Whether method is final
Swift
public var isFinal: Bool { get }
`
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 var writeAccess: String
`
isAsync
`
Whether subscript is async
Swift
public let isAsync: Bool
`
throws
`
Whether subscript throws
Swift
public let `throws`: Bool
`
throwsTypeName
`
Type of thrown error if specified
Swift
public let throwsTypeName: TypeName?
`
isMutable
`
Whether variable is mutable or not
Swift
public var isMutable: Bool { get }
`
annotations
`
Annotations, that were created with // sourcery: annotation1, other = “annotation value”, alterantive = 2
Swift
public let annotations: Annotations
`
documentation
`
Swift
public let documentation: Documentation
`
definedInTypeName
`
Reference to type name where the method is defined, nil if defined outside of any enum, struct, class etc
Swift
public let definedInTypeName: TypeName?
`
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?
`
attributes
`
Method attributes, i.e. @discardableResult
Swift
public let attributes: AttributeList
`
modifiers
`
Method modifiers, i.e. private
Swift
public let modifiers: [SourceryModifier]
`
genericParameters
`
list of generic parameters
Swift
public let genericParameters: [GenericParameter]
`
genericRequirements
`
list of generic requirements
Swift
public let genericRequirements: [GenericRequirement]
`
isGeneric
`
Whether subscript is generic or not
Swift
public var isGeneric: Bool { get }
`
init(parameters:returnTypeName:accessLevel:isAsync:throws:throwsTypeName:genericParameters:genericRequirements:attributes:modifiers:annotations:documentation:definedInTypeName:)
`
Swift
public init(parameters: [MethodParameter] = [],
returnTypeName: TypeName,
accessLevel: (read: AccessLevel, write: AccessLevel) = (.internal, .internal),
isAsync: Bool = false,
`throws`: Bool = false,
throwsTypeName: TypeName? = nil,
genericParameters: [GenericParameter] = [],
genericRequirements: [GenericRequirement] = [],
attributes: AttributeList = [:],
modifiers: [SourceryModifier] = [],
annotations: [String: NSObject] = [:],
documentation: [String] = [],
definedInTypeName: TypeName? = nil)
`
diffAgainst(_:)
`
Swift
public func diffAgainst(_ object: Any?) -> DiffableResult
Copyright © 2016-2021 Pixle. All rights reserved.
Generated by jazzy ♪♫ v0.14.0, a Realm project.