@@ -14,10 +14,12 @@ * file. */ #import "OFObject.h" #import "OFXMLParser.h" + +OF_ASSUME_NONNULL_BEGIN @class OFMutableArray OF_GENERIC(ObjectType); @class OFXMLElement; @class OFXMLElementBuilder; @@ -77,12 +79,12 @@ * @param prefix The prefix of the close tag * @param namespace_ The namespace of the close tag */ - (void)elementBuilder: (OFXMLElementBuilder*)builder didNotExpectCloseTag: (OFString*)name - prefix: (OFString*)prefix - namespace: (OFString*)namespace_; + prefix: (nullable OFString*)prefix + namespace: (nullable OFString*)namespace_; /*! * @brief This callback is called when the XML parser for the element builder * found an unknown entity. * @@ -109,32 +111,34 @@ OFMutableArray OF_GENERIC(OFXMLElement*) *_stack; id _delegate; } #ifdef OF_HAVE_PROPERTIES -@property (assign) id delegate; +@property (assign, nullable) id delegate; #endif /*! * @brief Creates a new element builder. * * @return A new, autoreleased OFXMLElementBuilder */ + (instancetype)elementBuilder; -/*! - * @brief Returns the delegate for the OFXMLElementBuilder. - * - * @return The delegate for the OFXMLElementBuilder - */ -- (id )delegate; - /*! * @brief Sets the delegate for the OFXMLElementBuilder. * * @param delegate The delegate for the OFXMLElementBuilder */ -- (void)setDelegate: (id )delegate; +- (void)setDelegate: (nullable id )delegate; + +/*! + * @brief Returns the delegate for the OFXMLElementBuilder. + * + * @return The delegate for the OFXMLElementBuilder + */ +- (nullable id )delegate; @end @interface OFObject (OFXMLElementBuilderDelegate) @end + +OF_ASSUME_NONNULL_END