Method
@objc(SwiftMethod)
@objcMembers
public final class Method : NSObject, SourceryModel, Annotated, Documented, Definition, Diffableextension Method: NSCodingDescribes method
- 
                  
                  Full method name, including generic constraints, i.e. foo<T>(bar: T)DeclarationSwift public let name: String
- 
                  
                  Method name including arguments names, i.e. foo(bar:)DeclarationSwift public var selectorName: String
- 
                  
                  Method name without arguments names and parentheses, i.e. foo<T>DeclarationSwift public var shortName: String { get }
- 
                  
                  Method name without arguments names, parentheses and generic types, i.e. foo(can be used to generate code for method call)DeclarationSwift public var callName: String { get }
- 
                  
                  Method parameters DeclarationSwift public var parameters: [MethodParameter]
- 
                  
                  Return value type name used in declaration, including generic constraints, i.e. where T: EquatableDeclarationSwift public var returnTypeName: TypeName
- 
                  
                  Actual return value type name if declaration uses typealias, otherwise just a returnTypeNameDeclarationSwift public var actualReturnTypeName: TypeName { get }
- 
                  
                  Actual return value type, if known DeclarationSwift public var returnType: Type?
- 
                  
                  Whether return value type is optional DeclarationSwift public var isOptionalReturnType: Bool { get }
- 
                  
                  Whether return value type is implicitly unwrapped optional DeclarationSwift public var isImplicitlyUnwrappedOptionalReturnType: Bool { get }
- 
                  
                  Return value type name without attributes and optional type information DeclarationSwift public var unwrappedReturnTypeName: String { get }
- 
                  
                  Whether method is async method DeclarationSwift public let isAsync: Bool
- 
                  
                  Whether method is distributed DeclarationSwift public var isDistributed: Bool { get }
- 
                  
                  Whether method throws DeclarationSwift public let `throws`: Bool
- 
                  
                  Type of thrown error if specified DeclarationSwift public let throwsTypeName: TypeName?
- 
                  
                  Return if the throwsType is generic DeclarationSwift public var isThrowsTypeGeneric: Bool { get }
- 
                  
                  Whether method rethrows DeclarationSwift public let `rethrows`: Bool
- 
                  
                  Method access level, i.e. internal,private,fileprivate,public,openDeclarationSwift public let accessLevel: String
- 
                  
                  Whether method is a static method DeclarationSwift public let isStatic: Bool
- 
                  
                  Whether method is a class method DeclarationSwift public let isClass: Bool
- 
                  
                  Whether method is an initializer DeclarationSwift public var isInitializer: Bool { get }
- 
                  
                  Whether method is an deinitializer DeclarationSwift public var isDeinitializer: Bool { get }
- 
                  
                  Whether method is a failable initializer DeclarationSwift public let isFailableInitializer: Bool
- 
                  
                  Whether method is a convenience initializer DeclarationSwift public var isConvenienceInitializer: Bool { get }
- 
                  
                  Whether method is required DeclarationSwift public var isRequired: Bool { get }
- 
                  
                  Whether method is final DeclarationSwift public var isFinal: Bool { get }
- 
                  
                  Whether method is mutating DeclarationSwift public var isMutating: Bool { get }
- 
                  
                  Whether method is generic DeclarationSwift public var isGeneric: Bool { get }
- 
                  
                  Whether method is optional (in an Objective-C protocol) DeclarationSwift public var isOptional: Bool { get }
- 
                  
                  Whether method is nonisolated (this modifier only applies to actor methods) DeclarationSwift public var isNonisolated: Bool { get }
- 
                  
                  Whether method is dynamic DeclarationSwift public var isDynamic: Bool { get }
- 
                  
                  Annotations, that were created with // sourcery: annotation1, other = “annotation value”, alterantive = 2 DeclarationSwift public let annotations: Annotations
- 
                  
                  DeclarationSwift public let documentation: Documentation
- 
                  
                  Reference to type name where the method is defined, nil if defined outside of any enum,struct,classetcDeclarationSwift public let definedInTypeName: TypeName?
- 
                  
                  Reference to actual type name where the method is defined if declaration uses typealias, otherwise just a definedInTypeNameDeclarationSwift public var actualDefinedInTypeName: TypeName? { get }
- 
                  
                  Reference to actual type where the object is defined, nil if defined outside of any enum,struct,classetc or type is unknownDeclarationSwift public var definedInType: Type?
- 
                  
                  Method attributes, i.e. @discardableResultDeclarationSwift public let attributes: AttributeList
- 
                  
                  Method modifiers, i.e. privateDeclarationSwift public let modifiers: [SourceryModifier]
- 
                  
                  list of generic requirements DeclarationSwift public var genericRequirements: [GenericRequirement]
- 
                  
                  List of generic parameters - Example:
 func method<GenericParameter>(foo: GenericParameter) ^ ~ a generic parameterDeclarationSwift public var genericParameters: [GenericParameter]
- 
                  
                  DeclarationSwift public func diffAgainst(_ object: Any?) -> DiffableResult
 View on GitHub
View on GitHub Method Class Reference
        Method Class Reference