classify

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL