. 0 ▁required ▁that ▁a ▁class ▁must ▁implement ▁all ▁methods ▁in ▁a ▁protocol ▁it ▁decl ares ▁itself ▁as ▁adopt ing ; ▁the ▁compiler ▁will ▁emit ▁an ▁error ▁if ▁the ▁class ▁does ▁not ▁implement ▁every ▁method ▁from ▁its ▁declared ▁protocol s . ▁Object ive - C ▁ 2 . 0 ▁added ▁support ▁for ▁mark ing ▁certain ▁methods ▁in ▁a ▁protocol ▁optional , ▁and ▁the ▁compiler ▁will ▁not ▁en force ▁implementation ▁of ▁optional ▁methods . ▁ ▁A ▁class ▁must ▁be ▁declared ▁to ▁implement ▁that ▁protocol ▁to ▁be ▁said ▁to ▁conform ▁to ▁it . ▁This ▁is ▁detect able ▁at ▁runtime . ▁F ormal ▁protocol s ▁cannot ▁provide ▁any ▁implementations ; ▁they ▁simply ▁ass ure ▁call ers ▁that ▁classes ▁that ▁conform ▁to ▁the ▁protocol ▁will ▁provide ▁implementations . ▁In ▁the ▁Ne XT / App le ▁library , ▁protocol s ▁are ▁frequently ▁used ▁by ▁the ▁Dist ributed ▁Object s ▁system ▁to ▁represent ▁the ▁ab ilities ▁of ▁an ▁object ▁executing ▁on ▁a ▁remote ▁system . ▁ ▁The ▁syntax ▁ ▁@ protocol ▁NS Lock ing ▁- ▁( void ) lock ; ▁- ▁( void ) un lock ; ▁@ end ▁ ▁denotes ▁that ▁there ▁is ▁the ▁abstract ▁idea ▁of ▁lock ing . ▁By ▁stating ▁in ▁the ▁class ▁definition ▁that ▁the ▁protocol ▁is ▁implemented , ▁ ▁@ interface ▁NS Lock ▁: ▁NS Object ▁< NS Lock ing > ▁// ... ▁@ end ▁ ▁instances ▁of ▁NS Lock ▁claim ▁that ▁they ▁will ▁provide ▁an ▁implementation ▁for ▁the ▁two ▁instance ▁methods . ▁ ▁Dynamic ▁typing ▁Object ive - C , ▁like ▁Small t