Kernel-Announcements.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  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. return smalltalk.withContext(function($ctx1) {
  94. var $1;
  95. $1=_st(anAnnouncement)._isKindOf_(_st(self)._announcementClass());
  96. return $1;
  97. }, function($ctx1) {$ctx1.fill(self,"handlesAnnouncement:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
  98. args: ["anAnnouncement"],
  99. source: "handlesAnnouncement: anAnnouncement\x0a\x09^anAnnouncement isKindOf: self announcementClass",
  100. messageSends: ["isKindOf:", "announcementClass"],
  101. referencedClasses: []
  102. }),
  103. smalltalk.AnnouncementSubscription);
  104. smalltalk.addClass('Announcer', smalltalk.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
  105. 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."
  106. smalltalk.addMethod(
  107. smalltalk.method({
  108. selector: "announce:",
  109. category: 'announcing',
  110. fn: function (anAnnouncement){
  111. var self=this;
  112. return smalltalk.withContext(function($ctx1) {
  113. _st(self["@subscriptions"])._do_((function(each){
  114. return smalltalk.withContext(function($ctx2) {
  115. return _st(each)._deliver_(anAnnouncement);
  116. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  117. return self}, function($ctx1) {$ctx1.fill(self,"announce:",{anAnnouncement:anAnnouncement},smalltalk.Announcer)})},
  118. args: ["anAnnouncement"],
  119. source: "announce: anAnnouncement\x0a\x09subscriptions do: [:each |\x0a\x09\x09each deliver: anAnnouncement]",
  120. messageSends: ["do:", "deliver:"],
  121. referencedClasses: []
  122. }),
  123. smalltalk.Announcer);
  124. smalltalk.addMethod(
  125. smalltalk.method({
  126. selector: "initialize",
  127. category: 'initialization',
  128. fn: function (){
  129. var self=this;
  130. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  131. return smalltalk.withContext(function($ctx1) {
  132. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  133. self["@subscriptions"]=_st($Array())._new();
  134. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Announcer)})},
  135. args: [],
  136. source: "initialize\x0a\x09super initialize.\x0a\x09subscriptions := Array new",
  137. messageSends: ["initialize", "new"],
  138. referencedClasses: ["Array"]
  139. }),
  140. smalltalk.Announcer);
  141. smalltalk.addMethod(
  142. smalltalk.method({
  143. selector: "on:do:",
  144. category: 'subscribing',
  145. fn: function (aClass,aBlock){
  146. var self=this;
  147. function $AnnouncementSubscription(){return smalltalk.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
  148. return smalltalk.withContext(function($ctx1) {
  149. var $1,$2;
  150. $1=_st($AnnouncementSubscription())._new();
  151. _st($1)._block_(aBlock);
  152. _st($1)._announcementClass_(aClass);
  153. $2=_st($1)._yourself();
  154. _st(self["@subscriptions"])._add_($2);
  155. return self}, function($ctx1) {$ctx1.fill(self,"on:do:",{aClass:aClass,aBlock:aBlock},smalltalk.Announcer)})},
  156. args: ["aClass", "aBlock"],
  157. source: "on: aClass do: aBlock\x0a\x09subscriptions add: (AnnouncementSubscription new\x0a\x09\x09block: aBlock;\x0a\x09\x09announcementClass: aClass;\x0a\x09\x09yourself)",
  158. messageSends: ["add:", "block:", "new", "announcementClass:", "yourself"],
  159. referencedClasses: ["AnnouncementSubscription"]
  160. }),
  161. smalltalk.Announcer);
  162. smalltalk.addClass('SystemAnnouncer', smalltalk.Announcer, [], 'Kernel-Announcements');
  163. smalltalk.SystemAnnouncer.comment="My unique instance #current is the global announcer handling all Amber system-related announces"
  164. smalltalk.SystemAnnouncer.klass.iVarNames = ['current'];
  165. smalltalk.addMethod(
  166. smalltalk.method({
  167. selector: "current",
  168. category: 'accessing',
  169. fn: function (){
  170. var self=this;
  171. return smalltalk.withContext(function($ctx1) {
  172. var $2,$1;
  173. $2=self["@current"];
  174. if(($receiver = $2) == nil || $receiver == undefined){
  175. self["@current"]=smalltalk.Announcer.klass.fn.prototype._new.apply(_st(self), []);
  176. $1=self["@current"];
  177. } else {
  178. $1=$2;
  179. };
  180. return $1;
  181. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.SystemAnnouncer.klass)})},
  182. args: [],
  183. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  184. messageSends: ["ifNil:", "new"],
  185. referencedClasses: []
  186. }),
  187. smalltalk.SystemAnnouncer.klass);
  188. smalltalk.addMethod(
  189. smalltalk.method({
  190. selector: "new",
  191. category: 'instance creation',
  192. fn: function (){
  193. var self=this;
  194. return smalltalk.withContext(function($ctx1) {
  195. _st(self)._shouldNotImplement();
  196. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.SystemAnnouncer.klass)})},
  197. args: [],
  198. source: "new\x0a\x09self shouldNotImplement",
  199. messageSends: ["shouldNotImplement"],
  200. referencedClasses: []
  201. }),
  202. smalltalk.SystemAnnouncer.klass);
  203. smalltalk.addClass('SystemAnnouncement', smalltalk.Object, ['theClass'], 'Kernel-Announcements');
  204. smalltalk.SystemAnnouncement.comment="I am the superclass of all system announcements"
  205. smalltalk.addMethod(
  206. smalltalk.method({
  207. selector: "theClass",
  208. category: 'accessing',
  209. fn: function (){
  210. var self=this;
  211. return smalltalk.withContext(function($ctx1) {
  212. var $1;
  213. $1=self["@theClass"];
  214. return $1;
  215. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.SystemAnnouncement)})},
  216. args: [],
  217. source: "theClass\x0a\x09^ theClass",
  218. messageSends: [],
  219. referencedClasses: []
  220. }),
  221. smalltalk.SystemAnnouncement);
  222. smalltalk.addMethod(
  223. smalltalk.method({
  224. selector: "theClass:",
  225. category: 'accessing',
  226. fn: function (aClass){
  227. var self=this;
  228. return smalltalk.withContext(function($ctx1) {
  229. self["@theClass"]=aClass;
  230. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.SystemAnnouncement)})},
  231. args: ["aClass"],
  232. source: "theClass: aClass\x0a\x09theClass := aClass",
  233. messageSends: [],
  234. referencedClasses: []
  235. }),
  236. smalltalk.SystemAnnouncement);
  237. smalltalk.addClass('ClassAnnouncement', smalltalk.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
  238. smalltalk.addMethod(
  239. smalltalk.method({
  240. selector: "theClass",
  241. category: 'accessing',
  242. fn: function (){
  243. var self=this;
  244. return smalltalk.withContext(function($ctx1) {
  245. var $1;
  246. $1=self["@theClass"];
  247. return $1;
  248. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassAnnouncement)})},
  249. args: [],
  250. source: "theClass\x0a\x09^ theClass",
  251. messageSends: [],
  252. referencedClasses: []
  253. }),
  254. smalltalk.ClassAnnouncement);
  255. smalltalk.addMethod(
  256. smalltalk.method({
  257. selector: "theClass:",
  258. category: 'accessing',
  259. fn: function (aClass){
  260. var self=this;
  261. return smalltalk.withContext(function($ctx1) {
  262. self["@theClass"]=aClass;
  263. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassAnnouncement)})},
  264. args: ["aClass"],
  265. source: "theClass: aClass\x0a\x09theClass := aClass",
  266. messageSends: [],
  267. referencedClasses: []
  268. }),
  269. smalltalk.ClassAnnouncement);
  270. smalltalk.addClass('ClassAdded', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  271. smalltalk.ClassAdded.comment="I am emitted when a class is added to the system.\x0aSee ClassBuilder >> #addSubclassOf:... methods"
  272. smalltalk.addClass('ClassCommentChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  273. smalltalk.ClassCommentChanged.comment="I am emitted when the comment of a class changes. (Behavior >> #comment)"
  274. smalltalk.addClass('ClassDefinitionChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  275. smalltalk.ClassDefinitionChanged.comment="I am emitted when the defintion of a class changes.\x0aSee ClassBuilder >> #class:instanceVariableNames:"
  276. smalltalk.addClass('ClassMoved', smalltalk.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
  277. smalltalk.addMethod(
  278. smalltalk.method({
  279. selector: "oldPackage",
  280. category: 'accessing',
  281. fn: function (){
  282. var self=this;
  283. return smalltalk.withContext(function($ctx1) {
  284. var $1;
  285. $1=self["@oldPackage"];
  286. return $1;
  287. }, function($ctx1) {$ctx1.fill(self,"oldPackage",{},smalltalk.ClassMoved)})},
  288. args: [],
  289. source: "oldPackage\x0a\x09^ oldPackage",
  290. messageSends: [],
  291. referencedClasses: []
  292. }),
  293. smalltalk.ClassMoved);
  294. smalltalk.addMethod(
  295. smalltalk.method({
  296. selector: "oldPackage:",
  297. category: 'accessing',
  298. fn: function (aPackage){
  299. var self=this;
  300. return smalltalk.withContext(function($ctx1) {
  301. self["@oldPackage"]=aPackage;
  302. return self}, function($ctx1) {$ctx1.fill(self,"oldPackage:",{aPackage:aPackage},smalltalk.ClassMoved)})},
  303. args: ["aPackage"],
  304. source: "oldPackage: aPackage\x0a\x09oldPackage := aPackage",
  305. messageSends: [],
  306. referencedClasses: []
  307. }),
  308. smalltalk.ClassMoved);
  309. smalltalk.addClass('ClassRemoved', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  310. smalltalk.ClassRemoved.comment="I am emitted when a class is removed.\x0aSee Smalltalk >> #removeClass:"
  311. smalltalk.addClass('ClassRenamed', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  312. smalltalk.ClassRenamed.comment="I am emitted when a class is renamed.\x0aSee ClassBuilder >> #renameClass:to:"
  313. smalltalk.addClass('MethodAnnouncement', smalltalk.SystemAnnouncement, ['method'], 'Kernel-Announcements');
  314. smalltalk.addMethod(
  315. smalltalk.method({
  316. selector: "method",
  317. category: 'accessing',
  318. fn: function (){
  319. var self=this;
  320. return smalltalk.withContext(function($ctx1) {
  321. var $1;
  322. $1=self["@method"];
  323. return $1;
  324. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodAnnouncement)})},
  325. args: [],
  326. source: "method\x0a\x09^ method",
  327. messageSends: [],
  328. referencedClasses: []
  329. }),
  330. smalltalk.MethodAnnouncement);
  331. smalltalk.addMethod(
  332. smalltalk.method({
  333. selector: "method:",
  334. category: 'accessing',
  335. fn: function (aCompiledMethod){
  336. var self=this;
  337. return smalltalk.withContext(function($ctx1) {
  338. self["@method"]=aCompiledMethod;
  339. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.MethodAnnouncement)})},
  340. args: ["aCompiledMethod"],
  341. source: "method: aCompiledMethod\x0a\x09method := aCompiledMethod",
  342. messageSends: [],
  343. referencedClasses: []
  344. }),
  345. smalltalk.MethodAnnouncement);
  346. smalltalk.addClass('MethodAdded', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  347. smalltalk.addClass('MethodModified', smalltalk.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
  348. smalltalk.addMethod(
  349. smalltalk.method({
  350. selector: "oldMethod",
  351. category: 'accessing',
  352. fn: function (){
  353. var self=this;
  354. return smalltalk.withContext(function($ctx1) {
  355. var $1;
  356. $1=self["@oldMethod"];
  357. return $1;
  358. }, function($ctx1) {$ctx1.fill(self,"oldMethod",{},smalltalk.MethodModified)})},
  359. args: [],
  360. source: "oldMethod\x0a\x09^ oldMethod",
  361. messageSends: [],
  362. referencedClasses: []
  363. }),
  364. smalltalk.MethodModified);
  365. smalltalk.addMethod(
  366. smalltalk.method({
  367. selector: "oldMethod:",
  368. category: 'accessing',
  369. fn: function (aMethod){
  370. var self=this;
  371. return smalltalk.withContext(function($ctx1) {
  372. self["@oldMethod"]=aMethod;
  373. return self}, function($ctx1) {$ctx1.fill(self,"oldMethod:",{aMethod:aMethod},smalltalk.MethodModified)})},
  374. args: ["aMethod"],
  375. source: "oldMethod: aMethod\x0a\x09oldMethod := aMethod",
  376. messageSends: [],
  377. referencedClasses: []
  378. }),
  379. smalltalk.MethodModified);
  380. smalltalk.addClass('MethodMoved', smalltalk.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
  381. smalltalk.addMethod(
  382. smalltalk.method({
  383. selector: "oldProtocol",
  384. category: 'accessing',
  385. fn: function (){
  386. var self=this;
  387. return smalltalk.withContext(function($ctx1) {
  388. var $1;
  389. $1=self["@oldProtocol"];
  390. return $1;
  391. }, function($ctx1) {$ctx1.fill(self,"oldProtocol",{},smalltalk.MethodMoved)})},
  392. args: [],
  393. source: "oldProtocol\x0a\x09^ oldProtocol",
  394. messageSends: [],
  395. referencedClasses: []
  396. }),
  397. smalltalk.MethodMoved);
  398. smalltalk.addMethod(
  399. smalltalk.method({
  400. selector: "oldProtocol:",
  401. category: 'accessing',
  402. fn: function (aString){
  403. var self=this;
  404. return smalltalk.withContext(function($ctx1) {
  405. self["@oldProtocol"]=aString;
  406. return self}, function($ctx1) {$ctx1.fill(self,"oldProtocol:",{aString:aString},smalltalk.MethodMoved)})},
  407. args: ["aString"],
  408. source: "oldProtocol: aString\x0a\x09oldProtocol := aString",
  409. messageSends: [],
  410. referencedClasses: []
  411. }),
  412. smalltalk.MethodMoved);
  413. smalltalk.addClass('MethodRemoved', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  414. smalltalk.addClass('PackageAnnouncement', smalltalk.SystemAnnouncement, ['package'], 'Kernel-Announcements');
  415. smalltalk.addMethod(
  416. smalltalk.method({
  417. selector: "package",
  418. category: 'accessing',
  419. fn: function (){
  420. var self=this;
  421. return smalltalk.withContext(function($ctx1) {
  422. var $1;
  423. $1=self["@package"];
  424. return $1;
  425. }, function($ctx1) {$ctx1.fill(self,"package",{},smalltalk.PackageAnnouncement)})},
  426. args: [],
  427. source: "package\x0a\x09^ package",
  428. messageSends: [],
  429. referencedClasses: []
  430. }),
  431. smalltalk.PackageAnnouncement);
  432. smalltalk.addMethod(
  433. smalltalk.method({
  434. selector: "package:",
  435. category: 'accessing',
  436. fn: function (aPackage){
  437. var self=this;
  438. return smalltalk.withContext(function($ctx1) {
  439. self["@package"]=aPackage;
  440. return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage},smalltalk.PackageAnnouncement)})},
  441. args: ["aPackage"],
  442. source: "package: aPackage\x0a\x09package := aPackage",
  443. messageSends: [],
  444. referencedClasses: []
  445. }),
  446. smalltalk.PackageAnnouncement);
  447. smalltalk.addClass('PackageAdded', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  448. smalltalk.addClass('PackageRemoved', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  449. smalltalk.addClass('ProtocolAnnouncement', smalltalk.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
  450. smalltalk.addMethod(
  451. smalltalk.method({
  452. selector: "protocol",
  453. category: 'accessing',
  454. fn: function (){
  455. var self=this;
  456. return smalltalk.withContext(function($ctx1) {
  457. var $1;
  458. $1=self["@protocol"];
  459. return $1;
  460. }, function($ctx1) {$ctx1.fill(self,"protocol",{},smalltalk.ProtocolAnnouncement)})},
  461. args: [],
  462. source: "protocol\x0a\x09^ protocol",
  463. messageSends: [],
  464. referencedClasses: []
  465. }),
  466. smalltalk.ProtocolAnnouncement);
  467. smalltalk.addMethod(
  468. smalltalk.method({
  469. selector: "protocol:",
  470. category: 'accessing',
  471. fn: function (aString){
  472. var self=this;
  473. return smalltalk.withContext(function($ctx1) {
  474. self["@protocol"]=aString;
  475. return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString},smalltalk.ProtocolAnnouncement)})},
  476. args: ["aString"],
  477. source: "protocol: aString\x0a\x09protocol := aString",
  478. messageSends: [],
  479. referencedClasses: []
  480. }),
  481. smalltalk.ProtocolAnnouncement);
  482. smalltalk.addMethod(
  483. smalltalk.method({
  484. selector: "theClass",
  485. category: 'accessing',
  486. fn: function (){
  487. var self=this;
  488. return smalltalk.withContext(function($ctx1) {
  489. var $1;
  490. $1=self["@theClass"];
  491. return $1;
  492. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ProtocolAnnouncement)})},
  493. args: [],
  494. source: "theClass\x0a\x09^ theClass",
  495. messageSends: [],
  496. referencedClasses: []
  497. }),
  498. smalltalk.ProtocolAnnouncement);
  499. smalltalk.addMethod(
  500. smalltalk.method({
  501. selector: "theClass:",
  502. category: 'accessing',
  503. fn: function (aClass){
  504. var self=this;
  505. return smalltalk.withContext(function($ctx1) {
  506. self["@theClass"]=aClass;
  507. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ProtocolAnnouncement)})},
  508. args: ["aClass"],
  509. source: "theClass: aClass\x0a\x09theClass := aClass",
  510. messageSends: [],
  511. referencedClasses: []
  512. }),
  513. smalltalk.ProtocolAnnouncement);
  514. smalltalk.addClass('ProtocolAdded', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
  515. smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');