Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClassifyFramework ¶
func ClassifyFramework(framework *meta.FrameworkMeta) map[string]map[string][]PatternTag
ClassifyFramework returns a two-level map: className → selector → []PatternTag.
func IsDelegateProtocol ¶
IsDelegateProtocol reports whether a protocol exposes at least one optional method, which is the canonical marker of a delegate protocol in Cocoa.
Types ¶
type DelegateProperty ¶
type DelegateProperty struct {
PropertyName string
ProtocolName string // extracted from "id<ProtocolName>"
}
DelegateProperty records a property that holds a delegate or data source.
func DelegateProperties ¶
func DelegateProperties(cls meta.Class) []DelegateProperty
DelegateProperties returns the properties on a class whose name is "delegate" or "dataSource" and whose type is id<ProtocolName>.
type PatternTag ¶
type PatternTag string
PatternTag names a recognisable Objective-C ceremony pattern.
const ( AsyncCompletion PatternTag = "AsyncCompletion" BoolNSError PatternTag = "BoolNSError" NSErrorOut PatternTag = "NSErrorOut" DelegateHolder PatternTag = "DelegateHolder" DelegateProtocol PatternTag = "DelegateProtocol" CollectionReturn PatternTag = "CollectionReturn" CollectionParam PatternTag = "CollectionParam" PropertyPair PatternTag = "PropertyPair" MainThreadRequired PatternTag = "MainThreadRequired" BlockEnumeration PatternTag = "BlockEnumeration" )
func ClassifyMethod ¶
func ClassifyMethod(m meta.Method, cls meta.Class, _ *meta.FrameworkMeta) []PatternTag
ClassifyMethod returns pattern tags for a single method in a given class context. It does NOT return DelegateHolder or DelegateProtocol — those are class/protocol-level; use DelegateProperties and IsDelegateProtocol for those.
type TaggedMethod ¶
type TaggedMethod struct {
Method meta.Method
Tags []PatternTag
}
TaggedMethod pairs a method with its detected pattern tags.