docs/Classes/Method.html
@objc(SwiftMethod)
@objcMembers
public final class Method : NSObject, SourceryModel, Annotated, Documented, Definition, Diffable
extension Method: NSCoding
Describes method
`
name
`
Full method name, including generic constraints, i.e. foo<T>(bar: T)
Swift
public let name: String
`
selectorName
`
Method name including arguments names, i.e. foo(bar:)
Swift
public var selectorName: String
`
shortName
`
Method name without arguments names and parentheses, i.e. foo<T>
Swift
public var shortName: String { get }
`
callName
`
Method name without arguments names, parentheses and generic types, i.e. foo (can be used to generate code for method call)
Swift
public var callName: String { get }
`
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 }
`
isAsync
`
Whether method is async method
Swift
public let isAsync: Bool
`
isDistributed
`
Whether method is distributed
Swift
public var isDistributed: Bool { get }
`
throws
`
Whether method throws
Swift
public let `throws`: Bool
`
throwsTypeName
`
Type of thrown error if specified
Swift
public let throwsTypeName: TypeName?
`
isThrowsTypeGeneric
`
Return if the throwsType is generic
Swift
public var isThrowsTypeGeneric: Bool { get }
`
rethrows
`
Whether method rethrows
Swift
public let `rethrows`: Bool
`
accessLevel
`
Method access level, i.e. internal, private, fileprivate, public, open
Swift
public let accessLevel: String
`
isStatic
`
Whether method is a static method
Swift
public let isStatic: Bool
`
isClass
`
Whether method is a class method
Swift
public let isClass: Bool
`
isInitializer
`
Whether method is an initializer
Swift
public var isInitializer: Bool { get }
`
isDeinitializer
`
Whether method is an deinitializer
Swift
public var isDeinitializer: Bool { get }
`
isFailableInitializer
`
Whether method is a failable initializer
Swift
public let isFailableInitializer: Bool
`
isConvenienceInitializer
`
Whether method is a convenience initializer
Swift
public var isConvenienceInitializer: Bool { get }
`
isRequired
`
Whether method is required
Swift
public var isRequired: Bool { get }
`
isFinal
`
Whether method is final
Swift
public var isFinal: Bool { get }
`
isMutating
`
Whether method is mutating
Swift
public var isMutating: Bool { get }
`
isGeneric
`
Whether method is generic
Swift
public var isGeneric: Bool { get }
`
isOptional
`
Whether method is optional (in an Objective-C protocol)
Swift
public var isOptional: Bool { get }
`
isNonisolated
`
Whether method is nonisolated (this modifier only applies to actor methods)
Swift
public var isNonisolated: Bool { get }
`
isDynamic
`
Whether method is dynamic
Swift
public var isDynamic: 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]
`
genericRequirements
`
list of generic requirements
Swift
public var genericRequirements: [GenericRequirement]
`
genericParameters
`
List of generic parameters
func method<GenericParameter>(foo: GenericParameter)
^ ~ a generic parameter
Swift
public var genericParameters: [GenericParameter]
`
diffAgainst(_:)
`
Swift
public func diffAgainst(_ object: Any?) -> DiffableResult
Copyright © 2016-2021 Pixle. All rights reserved.
Generated by jazzy ♪♫ v0.14.0, a Realm project.