#import #import #import #import #import #import #import @class EnumCompanion, Enum, Foo, Array; @protocol Comparable, Iterator; NS_ASSUME_NONNULL_BEGIN #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunknown-warning-option" #pragma clang diagnostic ignored "-Wincompatible-property-type" #pragma clang diagnostic ignored "-Wnullability" #pragma push_macro("_Nullable_result") #if !__has_feature(nullability_nullable_result) #undef _Nullable_result #define _Nullable_result _Nullable #endif @protocol Comparable @required - (int32_t)compareToOther:(id _Nullable)other __attribute__((swift_name("compareTo(other:)"))); @end @interface Enum : Base - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)); @property (class, readonly, getter=companion) EnumCompanion *companion __attribute__((swift_name("companion"))); /** * @note This method has protected visibility in Kotlin source and is intended only for use by subclasses. */ - (id)clone __attribute__((swift_name("clone()"))); - (int32_t)compareToOther:(E)other __attribute__((swift_name("compareTo(other:)"))); - (BOOL)isEqual:(id _Nullable)other __attribute__((swift_name("isEqual(_:)"))); - (NSUInteger)hash __attribute__((swift_name("hash()"))); - (NSString *)description __attribute__((swift_name("description()"))); @property (readonly) NSString *name __attribute__((swift_name("name"))); @property (readonly) int32_t ordinal __attribute__((swift_name("ordinal"))); @end __attribute__((objc_subclassing_restricted)) @interface Foo : Enum + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (instancetype)initWithName:(NSString *)name ordinal:(int32_t)ordinal __attribute__((swift_name("init(name:ordinal:)"))) __attribute__((objc_designated_initializer)) __attribute__((unavailable)); @property (class, readonly) Foo *a __attribute__((swift_name("a"))); @property (class, readonly) Foo *b __attribute__((swift_name("b"))); @property (class, readonly) Foo *c __attribute__((swift_name("c"))); + (Array *)values __attribute__((swift_name("values()"))); @property (class, readonly) NSArray *entries __attribute__((swift_name("entries"))); @end __attribute__((objc_subclassing_restricted)) @interface EnumCompanion : Base + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); + (instancetype)companion __attribute__((swift_name("init()"))); @property (class, readonly, getter=shared) EnumCompanion *shared __attribute__((swift_name("shared"))); @end __attribute__((objc_subclassing_restricted)) @interface Array : Base + (instancetype)arrayWithSize:(int32_t)size init:(T _Nullable (^)(Int *))init __attribute__((swift_name("init(size:init:)"))); + (instancetype)alloc __attribute__((unavailable)); + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((unavailable)); - (T _Nullable)getIndex:(int32_t)index __attribute__((swift_name("get(index:)"))); - (id)iterator __attribute__((swift_name("iterator()"))); - (void)setIndex:(int32_t)index value:(T _Nullable)value __attribute__((swift_name("set(index:value:)"))); @property (readonly) int32_t size __attribute__((swift_name("size"))); @end @protocol Iterator @required - (BOOL)hasNext __attribute__((swift_name("hasNext()"))); - (id _Nullable)next __attribute__((swift_name("next()"))); @end #pragma pop_macro("_Nullable_result") #pragma clang diagnostic pop NS_ASSUME_NONNULL_END