Is it possible to add some meta-information on class, property, method in Objective-C? Something like annotations in Java or C# attributes ?
A:
I've never used Java Annotations or C# Attributes, but from what I've read in my Googling I believe what you are looking for is Objective-C Associated Objects
objc_setAssociatedObject(array, &overviewKey, nil, OBJC_ASSOCIATION_ASSIGN);
Andy Mataushack has already created an Objective-C wrapper for this
Colin Wheeler
2010-02-14 15:56:25
I need an ability to attach some additional information to the class methods and properties, not to add additional properties(association) to the existing class. Any way thanks for fast reply ;-)
2010-02-14 16:09:21
+1
A:
Keep in mind that "associative references" only operate at runtime. This question appears to be about attaching persistent metadata to classes/properties/methods. There is no support for this currently.
pcbeard
2010-02-19 22:49:08
Feel free to look here:http://www.opensource.apple.com/source/objc4/objc4-437.1/
pcbeard
2010-02-22 07:20:03