Documentation
¶
Index ¶
- func ClassifyFramework(framework *macosplatformmetadata.FrameworkMeta) map[string]map[string][]PatternTag
- func IsDelegateProtocol(proto macosplatformmetadata.Protocol) bool
- func PropertyPairs(class macosplatformmetadata.Class) []macosplatformmetadata.Property
- type DelegateProperty
- type PatternTag
- type TaggedMethod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClassifyFramework ¶
func ClassifyFramework(framework *macosplatformmetadata.FrameworkMeta) map[string]map[string][]PatternTag
ClassifyFramework returns a two-level map: className → selector → []PatternTag.
func IsDelegateProtocol ¶
func IsDelegateProtocol(proto macosplatformmetadata.Protocol) bool
IsDelegateProtocol reports whether a protocol exposes at least one optional method, which is the canonical marker of a delegate protocol in Cocoa.
func PropertyPairs ¶
func PropertyPairs(class macosplatformmetadata.Class) []macosplatformmetadata.Property
PropertyPairs returns all non-readonly properties from a class. These are the candidates for PropertyPair ergonomic wrappers.
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(class macosplatformmetadata.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 macosplatformmetadata.Method, class macosplatformmetadata.Class, _ *macosplatformmetadata.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 macosplatformmetadata.Method
Tags []PatternTag
}
TaggedMethod pairs a method with its detected pattern tags.