You cannot do this in Objective-C, the only work around I could suggest is sending a reference of the sender when you message your class, such as:
@implementation Animal
-(void) move:(id)sender{
id *object = [object that called move];
}
@end
Calling:
@implementation C1
...
[self.animal move:self];
...
@end
@implementation C2
...
[self.animal move:self];
...
@end
You can then use the isMemberOfClass: or isKindOfClass: to determine what type of object the sender is, isKindOfClass will return YES if the class in question is the class you send or a subclass of that. Whereas isMemberOfClass: will only return YES if the class you are messaging is an instance of the class you are sending it
example:
A * aClass; // is just A
[...]
B * bClass; // is a subclass of A
[...]
[aClass isMemberOfClass:[A class]]; // YES
[bClass isMemberOfClass:[A class]]; // YES
[aClass isKindOfClass:[A class]]; // YES
[bClass isKindOfClass:[A class]]; // NO