Kernel-Announcements.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. smalltalk.addPackage('Kernel-Announcements');
  2. smalltalk.addClass('AnnouncementSubscription', smalltalk.Object, ['block', 'announcementClass'], 'Kernel-Announcements');
  3. smalltalk.AnnouncementSubscription.comment="The subscription is a single entry in a subscription registry of an `Announcer`.\x0aSeveral subscriptions by the same object is possible."
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "announcementClass",
  7. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) {
  11. var $1;
  12. $1=self["@announcementClass"];
  13. return $1;
  14. }, function($ctx1) {$ctx1.fill(self,"announcementClass",{},smalltalk.AnnouncementSubscription)})},
  15. args: [],
  16. source: "announcementClass\x0a\x09^ announcementClass",
  17. messageSends: [],
  18. referencedClasses: []
  19. }),
  20. smalltalk.AnnouncementSubscription);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "announcementClass:",
  24. category: 'accessing',
  25. fn: function (aClass){
  26. var self=this;
  27. return smalltalk.withContext(function($ctx1) {
  28. self["@announcementClass"]=aClass;
  29. return self}, function($ctx1) {$ctx1.fill(self,"announcementClass:",{aClass:aClass},smalltalk.AnnouncementSubscription)})},
  30. args: ["aClass"],
  31. source: "announcementClass: aClass\x0a\x09announcementClass := aClass",
  32. messageSends: [],
  33. referencedClasses: []
  34. }),
  35. smalltalk.AnnouncementSubscription);
  36. smalltalk.addMethod(
  37. smalltalk.method({
  38. selector: "block",
  39. category: 'accessing',
  40. fn: function (){
  41. var self=this;
  42. return smalltalk.withContext(function($ctx1) {
  43. var $1;
  44. $1=self["@block"];
  45. return $1;
  46. }, function($ctx1) {$ctx1.fill(self,"block",{},smalltalk.AnnouncementSubscription)})},
  47. args: [],
  48. source: "block\x0a\x09^block",
  49. messageSends: [],
  50. referencedClasses: []
  51. }),
  52. smalltalk.AnnouncementSubscription);
  53. smalltalk.addMethod(
  54. smalltalk.method({
  55. selector: "block:",
  56. category: 'accessing',
  57. fn: function (aBlock){
  58. var self=this;
  59. return smalltalk.withContext(function($ctx1) {
  60. self["@block"]=aBlock;
  61. return self}, function($ctx1) {$ctx1.fill(self,"block:",{aBlock:aBlock},smalltalk.AnnouncementSubscription)})},
  62. args: ["aBlock"],
  63. source: "block: aBlock\x0a\x09block := aBlock",
  64. messageSends: [],
  65. referencedClasses: []
  66. }),
  67. smalltalk.AnnouncementSubscription);
  68. smalltalk.addMethod(
  69. smalltalk.method({
  70. selector: "deliver:",
  71. category: 'announcing',
  72. fn: function (anAnnouncement){
  73. var self=this;
  74. return smalltalk.withContext(function($ctx1) {
  75. var $1;
  76. $1=_st(self)._handlesAnnouncement_(anAnnouncement);
  77. if(smalltalk.assert($1)){
  78. _st(_st(self)._block())._value_(anAnnouncement);
  79. };
  80. return self}, function($ctx1) {$ctx1.fill(self,"deliver:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
  81. args: ["anAnnouncement"],
  82. source: "deliver: anAnnouncement\x0a\x09(self handlesAnnouncement: anAnnouncement)\x0a\x09\x09ifTrue: [self block value: anAnnouncement]",
  83. messageSends: ["ifTrue:", "value:", "block", "handlesAnnouncement:"],
  84. referencedClasses: []
  85. }),
  86. smalltalk.AnnouncementSubscription);
  87. smalltalk.addMethod(
  88. smalltalk.method({
  89. selector: "handlesAnnouncement:",
  90. category: 'announcing',
  91. fn: function (anAnnouncement){
  92. var self=this;
  93. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  94. return smalltalk.withContext(function($ctx1) {
  95. var $2,$1;
  96. $2=_st(_st($Smalltalk())._current())._at_(_st(_st(self)._announcementClass())._name());
  97. if(($receiver = $2) == nil || $receiver == undefined){
  98. return false;
  99. } else {
  100. var class_;
  101. class_=$receiver;
  102. $1=_st(class_)._includesBehavior_(_st(_st($Smalltalk())._current())._at_(_st(_st(_st(anAnnouncement)._class())._theNonMetaClass())._name()));
  103. };
  104. return $1;
  105. }, function($ctx1) {$ctx1.fill(self,"handlesAnnouncement:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
  106. args: ["anAnnouncement"],
  107. source: "handlesAnnouncement: anAnnouncement\x0a\x09\x22anAnnouncement might be announced from within another Amber environment\x22\x0a\x09\x0a\x09^ (Smalltalk current at: self announcementClass name)\x0a\x09\x09ifNil: [ ^ false ]\x0a\x09\x09ifNotNil: [ :class |\x0a\x09\x09class includesBehavior: (Smalltalk current at: anAnnouncement class theNonMetaClass name) ]",
  108. messageSends: ["ifNil:ifNotNil:", "includesBehavior:", "at:", "name", "theNonMetaClass", "class", "current", "announcementClass"],
  109. referencedClasses: ["Smalltalk"]
  110. }),
  111. smalltalk.AnnouncementSubscription);
  112. smalltalk.addClass('Announcer', smalltalk.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
  113. smalltalk.Announcer.comment="The code is based on the announcements as [described by Vassili Bykov](http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?searchCategory=Announcements%20Framework).\x0aThe Announcer holds annoncement subscriptions (`AnnouncementSubscription`) in a private registry.\x0a\x0aUse `#on:do:` to register subscriptions."
  114. smalltalk.addMethod(
  115. smalltalk.method({
  116. selector: "announce:",
  117. category: 'announcing',
  118. fn: function (anAnnouncement){
  119. var self=this;
  120. return smalltalk.withContext(function($ctx1) {
  121. _st(self["@subscriptions"])._do_((function(each){
  122. return smalltalk.withContext(function($ctx2) {
  123. return _st(each)._deliver_(anAnnouncement);
  124. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  125. return self}, function($ctx1) {$ctx1.fill(self,"announce:",{anAnnouncement:anAnnouncement},smalltalk.Announcer)})},
  126. args: ["anAnnouncement"],
  127. source: "announce: anAnnouncement\x0a\x09subscriptions do: [:each |\x0a\x09\x09each deliver: anAnnouncement]",
  128. messageSends: ["do:", "deliver:"],
  129. referencedClasses: []
  130. }),
  131. smalltalk.Announcer);
  132. smalltalk.addMethod(
  133. smalltalk.method({
  134. selector: "initialize",
  135. category: 'initialization',
  136. fn: function (){
  137. var self=this;
  138. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  139. return smalltalk.withContext(function($ctx1) {
  140. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  141. self["@subscriptions"]=_st($Array())._new();
  142. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Announcer)})},
  143. args: [],
  144. source: "initialize\x0a\x09super initialize.\x0a\x09subscriptions := Array new",
  145. messageSends: ["initialize", "new"],
  146. referencedClasses: ["Array"]
  147. }),
  148. smalltalk.Announcer);
  149. smalltalk.addMethod(
  150. smalltalk.method({
  151. selector: "on:do:",
  152. category: 'subscribing',
  153. fn: function (aClass,aBlock){
  154. var self=this;
  155. function $AnnouncementSubscription(){return smalltalk.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
  156. return smalltalk.withContext(function($ctx1) {
  157. var $1,$2;
  158. $1=_st($AnnouncementSubscription())._new();
  159. _st($1)._block_(aBlock);
  160. _st($1)._announcementClass_(aClass);
  161. $2=_st($1)._yourself();
  162. _st(self["@subscriptions"])._add_($2);
  163. return self}, function($ctx1) {$ctx1.fill(self,"on:do:",{aClass:aClass,aBlock:aBlock},smalltalk.Announcer)})},
  164. args: ["aClass", "aBlock"],
  165. source: "on: aClass do: aBlock\x0a\x09subscriptions add: (AnnouncementSubscription new\x0a\x09\x09block: aBlock;\x0a\x09\x09announcementClass: aClass;\x0a\x09\x09yourself)",
  166. messageSends: ["add:", "block:", "new", "announcementClass:", "yourself"],
  167. referencedClasses: ["AnnouncementSubscription"]
  168. }),
  169. smalltalk.Announcer);
  170. smalltalk.addClass('SystemAnnouncer', smalltalk.Announcer, [], 'Kernel-Announcements');
  171. smalltalk.SystemAnnouncer.comment="My unique instance #current is the global announcer handling all Amber system-related announces"
  172. smalltalk.SystemAnnouncer.klass.iVarNames = ['current'];
  173. smalltalk.addMethod(
  174. smalltalk.method({
  175. selector: "current",
  176. category: 'accessing',
  177. fn: function (){
  178. var self=this;
  179. return smalltalk.withContext(function($ctx1) {
  180. var $2,$1;
  181. $2=self["@current"];
  182. if(($receiver = $2) == nil || $receiver == undefined){
  183. self["@current"]=smalltalk.Announcer.klass.fn.prototype._new.apply(_st(self), []);
  184. $1=self["@current"];
  185. } else {
  186. $1=$2;
  187. };
  188. return $1;
  189. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.SystemAnnouncer.klass)})},
  190. args: [],
  191. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  192. messageSends: ["ifNil:", "new"],
  193. referencedClasses: []
  194. }),
  195. smalltalk.SystemAnnouncer.klass);
  196. smalltalk.addMethod(
  197. smalltalk.method({
  198. selector: "new",
  199. category: 'instance creation',
  200. fn: function (){
  201. var self=this;
  202. return smalltalk.withContext(function($ctx1) {
  203. _st(self)._shouldNotImplement();
  204. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.SystemAnnouncer.klass)})},
  205. args: [],
  206. source: "new\x0a\x09self shouldNotImplement",
  207. messageSends: ["shouldNotImplement"],
  208. referencedClasses: []
  209. }),
  210. smalltalk.SystemAnnouncer.klass);
  211. smalltalk.addClass('SystemAnnouncement', smalltalk.Object, ['theClass'], 'Kernel-Announcements');
  212. smalltalk.SystemAnnouncement.comment="I am the superclass of all system announcements"
  213. smalltalk.addMethod(
  214. smalltalk.method({
  215. selector: "theClass",
  216. category: 'accessing',
  217. fn: function (){
  218. var self=this;
  219. return smalltalk.withContext(function($ctx1) {
  220. var $1;
  221. $1=self["@theClass"];
  222. return $1;
  223. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.SystemAnnouncement)})},
  224. args: [],
  225. source: "theClass\x0a\x09^ theClass",
  226. messageSends: [],
  227. referencedClasses: []
  228. }),
  229. smalltalk.SystemAnnouncement);
  230. smalltalk.addMethod(
  231. smalltalk.method({
  232. selector: "theClass:",
  233. category: 'accessing',
  234. fn: function (aClass){
  235. var self=this;
  236. return smalltalk.withContext(function($ctx1) {
  237. self["@theClass"]=aClass;
  238. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.SystemAnnouncement)})},
  239. args: ["aClass"],
  240. source: "theClass: aClass\x0a\x09theClass := aClass",
  241. messageSends: [],
  242. referencedClasses: []
  243. }),
  244. smalltalk.SystemAnnouncement);
  245. smalltalk.addClass('ClassAnnouncement', smalltalk.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
  246. smalltalk.addMethod(
  247. smalltalk.method({
  248. selector: "theClass",
  249. category: 'accessing',
  250. fn: function (){
  251. var self=this;
  252. return smalltalk.withContext(function($ctx1) {
  253. var $1;
  254. $1=self["@theClass"];
  255. return $1;
  256. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassAnnouncement)})},
  257. args: [],
  258. source: "theClass\x0a\x09^ theClass",
  259. messageSends: [],
  260. referencedClasses: []
  261. }),
  262. smalltalk.ClassAnnouncement);
  263. smalltalk.addMethod(
  264. smalltalk.method({
  265. selector: "theClass:",
  266. category: 'accessing',
  267. fn: function (aClass){
  268. var self=this;
  269. return smalltalk.withContext(function($ctx1) {
  270. self["@theClass"]=aClass;
  271. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassAnnouncement)})},
  272. args: ["aClass"],
  273. source: "theClass: aClass\x0a\x09theClass := aClass",
  274. messageSends: [],
  275. referencedClasses: []
  276. }),
  277. smalltalk.ClassAnnouncement);
  278. smalltalk.addClass('ClassAdded', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  279. smalltalk.ClassAdded.comment="I am emitted when a class is added to the system.\x0aSee ClassBuilder >> #addSubclassOf:... methods"
  280. smalltalk.addClass('ClassCommentChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  281. smalltalk.ClassCommentChanged.comment="I am emitted when the comment of a class changes. (Behavior >> #comment)"
  282. smalltalk.addClass('ClassDefinitionChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  283. smalltalk.ClassDefinitionChanged.comment="I am emitted when the defintion of a class changes.\x0aSee ClassBuilder >> #class:instanceVariableNames:"
  284. smalltalk.addClass('ClassMoved', smalltalk.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
  285. smalltalk.addMethod(
  286. smalltalk.method({
  287. selector: "oldPackage",
  288. category: 'accessing',
  289. fn: function (){
  290. var self=this;
  291. return smalltalk.withContext(function($ctx1) {
  292. var $1;
  293. $1=self["@oldPackage"];
  294. return $1;
  295. }, function($ctx1) {$ctx1.fill(self,"oldPackage",{},smalltalk.ClassMoved)})},
  296. args: [],
  297. source: "oldPackage\x0a\x09^ oldPackage",
  298. messageSends: [],
  299. referencedClasses: []
  300. }),
  301. smalltalk.ClassMoved);
  302. smalltalk.addMethod(
  303. smalltalk.method({
  304. selector: "oldPackage:",
  305. category: 'accessing',
  306. fn: function (aPackage){
  307. var self=this;
  308. return smalltalk.withContext(function($ctx1) {
  309. self["@oldPackage"]=aPackage;
  310. return self}, function($ctx1) {$ctx1.fill(self,"oldPackage:",{aPackage:aPackage},smalltalk.ClassMoved)})},
  311. args: ["aPackage"],
  312. source: "oldPackage: aPackage\x0a\x09oldPackage := aPackage",
  313. messageSends: [],
  314. referencedClasses: []
  315. }),
  316. smalltalk.ClassMoved);
  317. smalltalk.addClass('ClassRemoved', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  318. smalltalk.ClassRemoved.comment="I am emitted when a class is removed.\x0aSee Smalltalk >> #removeClass:"
  319. smalltalk.addClass('ClassRenamed', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  320. smalltalk.ClassRenamed.comment="I am emitted when a class is renamed.\x0aSee ClassBuilder >> #renameClass:to:"
  321. smalltalk.addClass('MethodAnnouncement', smalltalk.SystemAnnouncement, ['method'], 'Kernel-Announcements');
  322. smalltalk.addMethod(
  323. smalltalk.method({
  324. selector: "method",
  325. category: 'accessing',
  326. fn: function (){
  327. var self=this;
  328. return smalltalk.withContext(function($ctx1) {
  329. var $1;
  330. $1=self["@method"];
  331. return $1;
  332. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodAnnouncement)})},
  333. args: [],
  334. source: "method\x0a\x09^ method",
  335. messageSends: [],
  336. referencedClasses: []
  337. }),
  338. smalltalk.MethodAnnouncement);
  339. smalltalk.addMethod(
  340. smalltalk.method({
  341. selector: "method:",
  342. category: 'accessing',
  343. fn: function (aCompiledMethod){
  344. var self=this;
  345. return smalltalk.withContext(function($ctx1) {
  346. self["@method"]=aCompiledMethod;
  347. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.MethodAnnouncement)})},
  348. args: ["aCompiledMethod"],
  349. source: "method: aCompiledMethod\x0a\x09method := aCompiledMethod",
  350. messageSends: [],
  351. referencedClasses: []
  352. }),
  353. smalltalk.MethodAnnouncement);
  354. smalltalk.addClass('MethodAdded', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  355. smalltalk.addClass('MethodModified', smalltalk.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
  356. smalltalk.addMethod(
  357. smalltalk.method({
  358. selector: "oldMethod",
  359. category: 'accessing',
  360. fn: function (){
  361. var self=this;
  362. return smalltalk.withContext(function($ctx1) {
  363. var $1;
  364. $1=self["@oldMethod"];
  365. return $1;
  366. }, function($ctx1) {$ctx1.fill(self,"oldMethod",{},smalltalk.MethodModified)})},
  367. args: [],
  368. source: "oldMethod\x0a\x09^ oldMethod",
  369. messageSends: [],
  370. referencedClasses: []
  371. }),
  372. smalltalk.MethodModified);
  373. smalltalk.addMethod(
  374. smalltalk.method({
  375. selector: "oldMethod:",
  376. category: 'accessing',
  377. fn: function (aMethod){
  378. var self=this;
  379. return smalltalk.withContext(function($ctx1) {
  380. self["@oldMethod"]=aMethod;
  381. return self}, function($ctx1) {$ctx1.fill(self,"oldMethod:",{aMethod:aMethod},smalltalk.MethodModified)})},
  382. args: ["aMethod"],
  383. source: "oldMethod: aMethod\x0a\x09oldMethod := aMethod",
  384. messageSends: [],
  385. referencedClasses: []
  386. }),
  387. smalltalk.MethodModified);
  388. smalltalk.addClass('MethodMoved', smalltalk.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
  389. smalltalk.addMethod(
  390. smalltalk.method({
  391. selector: "oldProtocol",
  392. category: 'accessing',
  393. fn: function (){
  394. var self=this;
  395. return smalltalk.withContext(function($ctx1) {
  396. var $1;
  397. $1=self["@oldProtocol"];
  398. return $1;
  399. }, function($ctx1) {$ctx1.fill(self,"oldProtocol",{},smalltalk.MethodMoved)})},
  400. args: [],
  401. source: "oldProtocol\x0a\x09^ oldProtocol",
  402. messageSends: [],
  403. referencedClasses: []
  404. }),
  405. smalltalk.MethodMoved);
  406. smalltalk.addMethod(
  407. smalltalk.method({
  408. selector: "oldProtocol:",
  409. category: 'accessing',
  410. fn: function (aString){
  411. var self=this;
  412. return smalltalk.withContext(function($ctx1) {
  413. self["@oldProtocol"]=aString;
  414. return self}, function($ctx1) {$ctx1.fill(self,"oldProtocol:",{aString:aString},smalltalk.MethodMoved)})},
  415. args: ["aString"],
  416. source: "oldProtocol: aString\x0a\x09oldProtocol := aString",
  417. messageSends: [],
  418. referencedClasses: []
  419. }),
  420. smalltalk.MethodMoved);
  421. smalltalk.addClass('MethodRemoved', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  422. smalltalk.addClass('PackageAnnouncement', smalltalk.SystemAnnouncement, ['package'], 'Kernel-Announcements');
  423. smalltalk.addMethod(
  424. smalltalk.method({
  425. selector: "package",
  426. category: 'accessing',
  427. fn: function (){
  428. var self=this;
  429. return smalltalk.withContext(function($ctx1) {
  430. var $1;
  431. $1=self["@package"];
  432. return $1;
  433. }, function($ctx1) {$ctx1.fill(self,"package",{},smalltalk.PackageAnnouncement)})},
  434. args: [],
  435. source: "package\x0a\x09^ package",
  436. messageSends: [],
  437. referencedClasses: []
  438. }),
  439. smalltalk.PackageAnnouncement);
  440. smalltalk.addMethod(
  441. smalltalk.method({
  442. selector: "package:",
  443. category: 'accessing',
  444. fn: function (aPackage){
  445. var self=this;
  446. return smalltalk.withContext(function($ctx1) {
  447. self["@package"]=aPackage;
  448. return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage},smalltalk.PackageAnnouncement)})},
  449. args: ["aPackage"],
  450. source: "package: aPackage\x0a\x09package := aPackage",
  451. messageSends: [],
  452. referencedClasses: []
  453. }),
  454. smalltalk.PackageAnnouncement);
  455. smalltalk.addClass('PackageAdded', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  456. smalltalk.addClass('PackageRemoved', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  457. smalltalk.addClass('ProtocolAnnouncement', smalltalk.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
  458. smalltalk.addMethod(
  459. smalltalk.method({
  460. selector: "protocol",
  461. category: 'accessing',
  462. fn: function (){
  463. var self=this;
  464. return smalltalk.withContext(function($ctx1) {
  465. var $1;
  466. $1=self["@protocol"];
  467. return $1;
  468. }, function($ctx1) {$ctx1.fill(self,"protocol",{},smalltalk.ProtocolAnnouncement)})},
  469. args: [],
  470. source: "protocol\x0a\x09^ protocol",
  471. messageSends: [],
  472. referencedClasses: []
  473. }),
  474. smalltalk.ProtocolAnnouncement);
  475. smalltalk.addMethod(
  476. smalltalk.method({
  477. selector: "protocol:",
  478. category: 'accessing',
  479. fn: function (aString){
  480. var self=this;
  481. return smalltalk.withContext(function($ctx1) {
  482. self["@protocol"]=aString;
  483. return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString},smalltalk.ProtocolAnnouncement)})},
  484. args: ["aString"],
  485. source: "protocol: aString\x0a\x09protocol := aString",
  486. messageSends: [],
  487. referencedClasses: []
  488. }),
  489. smalltalk.ProtocolAnnouncement);
  490. smalltalk.addMethod(
  491. smalltalk.method({
  492. selector: "theClass",
  493. category: 'accessing',
  494. fn: function (){
  495. var self=this;
  496. return smalltalk.withContext(function($ctx1) {
  497. var $1;
  498. $1=self["@theClass"];
  499. return $1;
  500. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ProtocolAnnouncement)})},
  501. args: [],
  502. source: "theClass\x0a\x09^ theClass",
  503. messageSends: [],
  504. referencedClasses: []
  505. }),
  506. smalltalk.ProtocolAnnouncement);
  507. smalltalk.addMethod(
  508. smalltalk.method({
  509. selector: "theClass:",
  510. category: 'accessing',
  511. fn: function (aClass){
  512. var self=this;
  513. return smalltalk.withContext(function($ctx1) {
  514. self["@theClass"]=aClass;
  515. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ProtocolAnnouncement)})},
  516. args: ["aClass"],
  517. source: "theClass: aClass\x0a\x09theClass := aClass",
  518. messageSends: [],
  519. referencedClasses: []
  520. }),
  521. smalltalk.ProtocolAnnouncement);
  522. smalltalk.addClass('ProtocolAdded', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
  523. smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');