in Source/TNL_Project.m [107:129]
static BOOL _TNLIntrospection_ObjectImplementsProtocolInstanceMethod(id object,
Protocol *p,
BOOL avoidRespondsToSelector,
BOOL allYesAnyNo)
{
Class theClass = [object class];
BOOL hit = allYesAnyNo;
for (unsigned int loop = NO; loop <= YES && (hit == allYesAnyNo); loop++) {
unsigned int count = 0;
struct objc_method_description * methodList = protocol_copyMethodDescriptionList(p, !loop, YES, &count);
if (count > 0) {
for (unsigned int i = 0; i < count && (hit == allYesAnyNo); i++) {
if (avoidRespondsToSelector) {
hit = (NULL != class_getInstanceMethod(theClass, methodList[i].name));
} else {
hit = [object respondsToSelector:methodList[i].name];
}
}
}
free(methodList);
}
return hit;
}