Bases: object
This class is the main interface to inspect Objective-C metadata
It can be instantiated using the function lief.MachO.Binary.objc_metadata
Return an iterator over the Objective-C categories declared in this binary (e.g. @interface NSString (MyAdditions)).
Return an iterator over the different Objective-C classes (@interface).
Try to find the Objective-C class with the given mangled name.
Try to find the Objective-C protocol with the given mangled name.
Return an iterator over the Objective-C protocols declared in this binary (@protocol).
Generate a header-like of all the Objective-C metadata identified in the binary.
The generated output can be configured with the provided DeclOpt parameter.
Bases: object
This class represents an Objective-C class (@interface)
Demangled name of the class
Demangled name of the superclass.
Iterator over the different instance variables defined in this class.
Iterator over the different methods defined by this class.
Name of the class
Iterator over the properties of this class.
Iterator over the different protocols implemented by this class.
Parent class in case of inheritance.
This is set only when the superclass is defined in the same binary. For root classes (e.g. NSObject) or superclasses imported from another image, it is None even though super_name / demangled_super_name may still be resolved.
(raw) name of the superclass (empty for root classes or when it could not be resolved).
Generate a header-like string for this specific class.
The generated output can be configured with the provided DeclOpt parameter.
Bases: object
This class represents an Objective-C category (e.g. @interface NSString (MyAdditions))
(demangled) name of the class extended by this category
Iterator over the different methods defined by this category.
Name of the category
Iterator over the properties of this category.
Iterator over the different protocols adopted by this category.
Generate a header-like string for this specific category.
The generated output can be configured with the provided DeclOpt parameter.
Bases: object
This class represents an Objective-C @protocol
Mangled name of the protocol
Iterator over the methods that could be overridden
Iterator over the properties defined in this protocol
Iterator over the protocols adopted by this protocol (e.g. the <Bar, Baz> in @protocol Foo <Bar, Baz>).
Iterator over the methods of this protocol that must be implemented
Generate a header-like string for this specific protocol.
The generated output can be configured with the provided DeclOpt parameter.
Bases: object
This class represents an Objective-C Method.
Virtual address where this method is implemented in the binary
Whether it’s an instance method or not.
Prototype of the method in its mangled representation (e.g. @16@0:8)
Name of the method
Bases: object
This structure wraps options to tweak the generated output of functions like lief.objc.Metadata.to_decl()
Whether annotations like method’s address should be printed.