Kernel-Announcements.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. smalltalk.addPackage('Kernel-Announcements');
  2. smalltalk.addClass('AnnouncementSubscription', smalltalk.Object, ['valuable', '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. _st(self)._deprecatedAPI();
  45. $1=_st(self)._valuable();
  46. return $1;
  47. }, function($ctx1) {$ctx1.fill(self,"block",{},smalltalk.AnnouncementSubscription)})},
  48. args: [],
  49. source: "block\x0a\x09\x22Use #valuable instead\x22\x0a\x09\x0a\x09self deprecatedAPI.\x0a\x09^ self valuable",
  50. messageSends: ["deprecatedAPI", "valuable"],
  51. referencedClasses: []
  52. }),
  53. smalltalk.AnnouncementSubscription);
  54. smalltalk.addMethod(
  55. smalltalk.method({
  56. selector: "block:",
  57. category: 'accessing',
  58. fn: function (aValuable){
  59. var self=this;
  60. return smalltalk.withContext(function($ctx1) {
  61. _st(self)._deprecatedAPI();
  62. _st(self)._valuable_(aValuable);
  63. return self}, function($ctx1) {$ctx1.fill(self,"block:",{aValuable:aValuable},smalltalk.AnnouncementSubscription)})},
  64. args: ["aValuable"],
  65. source: "block: aValuable\x0a\x09\x22Use #valuable instead\x22\x0a\x09\x0a\x09self deprecatedAPI.\x0a\x09self valuable: aValuable",
  66. messageSends: ["deprecatedAPI", "valuable:"],
  67. referencedClasses: []
  68. }),
  69. smalltalk.AnnouncementSubscription);
  70. smalltalk.addMethod(
  71. smalltalk.method({
  72. selector: "deliver:",
  73. category: 'announcing',
  74. fn: function (anAnnouncement){
  75. var self=this;
  76. return smalltalk.withContext(function($ctx1) {
  77. var $1;
  78. $1=_st(self)._handlesAnnouncement_(anAnnouncement);
  79. if(smalltalk.assert($1)){
  80. _st(_st(self)._valuable())._value_(anAnnouncement);
  81. };
  82. return self}, function($ctx1) {$ctx1.fill(self,"deliver:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
  83. args: ["anAnnouncement"],
  84. source: "deliver: anAnnouncement\x0a\x09(self handlesAnnouncement: anAnnouncement)\x0a\x09\x09ifTrue: [self valuable value: anAnnouncement]",
  85. messageSends: ["ifTrue:", "value:", "valuable", "handlesAnnouncement:"],
  86. referencedClasses: []
  87. }),
  88. smalltalk.AnnouncementSubscription);
  89. smalltalk.addMethod(
  90. smalltalk.method({
  91. selector: "handlesAnnouncement:",
  92. category: 'announcing',
  93. fn: function (anAnnouncement){
  94. var self=this;
  95. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  96. return smalltalk.withContext(function($ctx1) {
  97. var $2,$1;
  98. $2=_st(_st($Smalltalk())._current())._at_(_st(_st(self)._announcementClass())._name());
  99. if(($receiver = $2) == nil || $receiver == undefined){
  100. return false;
  101. } else {
  102. var class_;
  103. class_=$receiver;
  104. $1=_st(class_)._includesBehavior_(_st(_st($Smalltalk())._current())._at_(_st(_st(_st(anAnnouncement)._class())._theNonMetaClass())._name()));
  105. };
  106. return $1;
  107. }, function($ctx1) {$ctx1.fill(self,"handlesAnnouncement:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
  108. args: ["anAnnouncement"],
  109. 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) ]",
  110. messageSends: ["ifNil:ifNotNil:", "includesBehavior:", "at:", "name", "theNonMetaClass", "class", "current", "announcementClass"],
  111. referencedClasses: ["Smalltalk"]
  112. }),
  113. smalltalk.AnnouncementSubscription);
  114. smalltalk.addMethod(
  115. smalltalk.method({
  116. selector: "receiver",
  117. category: 'accessing',
  118. fn: function (){
  119. var self=this;
  120. return smalltalk.withContext(function($ctx1) {
  121. var $1;
  122. $1=_st(_st(self)._valuable())._receiver();
  123. return $1;
  124. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.AnnouncementSubscription)})},
  125. args: [],
  126. source: "receiver\x0a\x09^ self valuable receiver",
  127. messageSends: ["receiver", "valuable"],
  128. referencedClasses: []
  129. }),
  130. smalltalk.AnnouncementSubscription);
  131. smalltalk.addMethod(
  132. smalltalk.method({
  133. selector: "valuable",
  134. category: 'accessing',
  135. fn: function (){
  136. var self=this;
  137. return smalltalk.withContext(function($ctx1) {
  138. var $1;
  139. $1=self["@valuable"];
  140. return $1;
  141. }, function($ctx1) {$ctx1.fill(self,"valuable",{},smalltalk.AnnouncementSubscription)})},
  142. args: [],
  143. source: "valuable\x0a\x09^ valuable",
  144. messageSends: [],
  145. referencedClasses: []
  146. }),
  147. smalltalk.AnnouncementSubscription);
  148. smalltalk.addMethod(
  149. smalltalk.method({
  150. selector: "valuable:",
  151. category: 'accessing',
  152. fn: function (aValuable){
  153. var self=this;
  154. return smalltalk.withContext(function($ctx1) {
  155. self["@valuable"]=aValuable;
  156. return self}, function($ctx1) {$ctx1.fill(self,"valuable:",{aValuable:aValuable},smalltalk.AnnouncementSubscription)})},
  157. args: ["aValuable"],
  158. source: "valuable: aValuable\x0a\x09valuable := aValuable",
  159. messageSends: [],
  160. referencedClasses: []
  161. }),
  162. smalltalk.AnnouncementSubscription);
  163. smalltalk.addClass('Announcer', smalltalk.Object, ['registry', 'subscriptions'], 'Kernel-Announcements');
  164. 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."
  165. smalltalk.addMethod(
  166. smalltalk.method({
  167. selector: "announce:",
  168. category: 'announcing',
  169. fn: function (anAnnouncement){
  170. var self=this;
  171. return smalltalk.withContext(function($ctx1) {
  172. _st(self["@subscriptions"])._do_((function(each){
  173. return smalltalk.withContext(function($ctx2) {
  174. return _st(each)._deliver_(anAnnouncement);
  175. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  176. return self}, function($ctx1) {$ctx1.fill(self,"announce:",{anAnnouncement:anAnnouncement},smalltalk.Announcer)})},
  177. args: ["anAnnouncement"],
  178. source: "announce: anAnnouncement\x0a\x09subscriptions do: [ :each |\x0a\x09\x09each deliver: anAnnouncement ]",
  179. messageSends: ["do:", "deliver:"],
  180. referencedClasses: []
  181. }),
  182. smalltalk.Announcer);
  183. smalltalk.addMethod(
  184. smalltalk.method({
  185. selector: "initialize",
  186. category: 'initialization',
  187. fn: function (){
  188. var self=this;
  189. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  190. return smalltalk.withContext(function($ctx1) {
  191. smalltalk.Object.fn.prototype._initialize.apply(_st(self), []);
  192. self["@subscriptions"]=_st($Array())._new();
  193. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Announcer)})},
  194. args: [],
  195. source: "initialize\x0a\x09super initialize.\x0a\x09subscriptions := Array new",
  196. messageSends: ["initialize", "new"],
  197. referencedClasses: ["Array"]
  198. }),
  199. smalltalk.Announcer);
  200. smalltalk.addMethod(
  201. smalltalk.method({
  202. selector: "on:do:",
  203. category: 'subscribing',
  204. fn: function (aClass,aBlock){
  205. var self=this;
  206. function $AnnouncementSubscription(){return smalltalk.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
  207. return smalltalk.withContext(function($ctx1) {
  208. var $1,$2;
  209. $1=_st($AnnouncementSubscription())._new();
  210. _st($1)._valuable_(aBlock);
  211. _st($1)._announcementClass_(aClass);
  212. $2=_st($1)._yourself();
  213. _st(self["@subscriptions"])._add_($2);
  214. return self}, function($ctx1) {$ctx1.fill(self,"on:do:",{aClass:aClass,aBlock:aBlock},smalltalk.Announcer)})},
  215. args: ["aClass", "aBlock"],
  216. source: "on: aClass do: aBlock\x0a\x09subscriptions add: (AnnouncementSubscription new\x0a\x09\x09valuable: aBlock;\x0a\x09\x09announcementClass: aClass;\x0a\x09\x09yourself)",
  217. messageSends: ["add:", "valuable:", "new", "announcementClass:", "yourself"],
  218. referencedClasses: ["AnnouncementSubscription"]
  219. }),
  220. smalltalk.Announcer);
  221. smalltalk.addClass('SystemAnnouncer', smalltalk.Announcer, [], 'Kernel-Announcements');
  222. smalltalk.SystemAnnouncer.comment="My unique instance #current is the global announcer handling all Amber system-related announces"
  223. smalltalk.SystemAnnouncer.klass.iVarNames = ['current'];
  224. smalltalk.addMethod(
  225. smalltalk.method({
  226. selector: "current",
  227. category: 'accessing',
  228. fn: function (){
  229. var self=this;
  230. return smalltalk.withContext(function($ctx1) {
  231. var $2,$1;
  232. $2=self["@current"];
  233. if(($receiver = $2) == nil || $receiver == undefined){
  234. self["@current"]=smalltalk.Announcer.klass.fn.prototype._new.apply(_st(self), []);
  235. $1=self["@current"];
  236. } else {
  237. $1=$2;
  238. };
  239. return $1;
  240. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.SystemAnnouncer.klass)})},
  241. args: [],
  242. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  243. messageSends: ["ifNil:", "new"],
  244. referencedClasses: []
  245. }),
  246. smalltalk.SystemAnnouncer.klass);
  247. smalltalk.addMethod(
  248. smalltalk.method({
  249. selector: "new",
  250. category: 'instance creation',
  251. fn: function (){
  252. var self=this;
  253. return smalltalk.withContext(function($ctx1) {
  254. _st(self)._shouldNotImplement();
  255. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.SystemAnnouncer.klass)})},
  256. args: [],
  257. source: "new\x0a\x09self shouldNotImplement",
  258. messageSends: ["shouldNotImplement"],
  259. referencedClasses: []
  260. }),
  261. smalltalk.SystemAnnouncer.klass);
  262. smalltalk.addClass('SystemAnnouncement', smalltalk.Object, ['theClass'], 'Kernel-Announcements');
  263. smalltalk.SystemAnnouncement.comment="I am the superclass of all system announcements"
  264. smalltalk.addMethod(
  265. smalltalk.method({
  266. selector: "theClass",
  267. category: 'accessing',
  268. fn: function (){
  269. var self=this;
  270. return smalltalk.withContext(function($ctx1) {
  271. var $1;
  272. $1=self["@theClass"];
  273. return $1;
  274. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.SystemAnnouncement)})},
  275. args: [],
  276. source: "theClass\x0a\x09^ theClass",
  277. messageSends: [],
  278. referencedClasses: []
  279. }),
  280. smalltalk.SystemAnnouncement);
  281. smalltalk.addMethod(
  282. smalltalk.method({
  283. selector: "theClass:",
  284. category: 'accessing',
  285. fn: function (aClass){
  286. var self=this;
  287. return smalltalk.withContext(function($ctx1) {
  288. self["@theClass"]=aClass;
  289. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.SystemAnnouncement)})},
  290. args: ["aClass"],
  291. source: "theClass: aClass\x0a\x09theClass := aClass",
  292. messageSends: [],
  293. referencedClasses: []
  294. }),
  295. smalltalk.SystemAnnouncement);
  296. smalltalk.addClass('ClassAnnouncement', smalltalk.SystemAnnouncement, ['theClass'], 'Kernel-Announcements');
  297. smalltalk.addMethod(
  298. smalltalk.method({
  299. selector: "theClass",
  300. category: 'accessing',
  301. fn: function (){
  302. var self=this;
  303. return smalltalk.withContext(function($ctx1) {
  304. var $1;
  305. $1=self["@theClass"];
  306. return $1;
  307. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassAnnouncement)})},
  308. args: [],
  309. source: "theClass\x0a\x09^ theClass",
  310. messageSends: [],
  311. referencedClasses: []
  312. }),
  313. smalltalk.ClassAnnouncement);
  314. smalltalk.addMethod(
  315. smalltalk.method({
  316. selector: "theClass:",
  317. category: 'accessing',
  318. fn: function (aClass){
  319. var self=this;
  320. return smalltalk.withContext(function($ctx1) {
  321. self["@theClass"]=aClass;
  322. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassAnnouncement)})},
  323. args: ["aClass"],
  324. source: "theClass: aClass\x0a\x09theClass := aClass",
  325. messageSends: [],
  326. referencedClasses: []
  327. }),
  328. smalltalk.ClassAnnouncement);
  329. smalltalk.addClass('ClassAdded', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  330. smalltalk.ClassAdded.comment="I am emitted when a class is added to the system.\x0aSee ClassBuilder >> #addSubclassOf:... methods"
  331. smalltalk.addClass('ClassCommentChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  332. smalltalk.ClassCommentChanged.comment="I am emitted when the comment of a class changes. (Behavior >> #comment)"
  333. smalltalk.addClass('ClassDefinitionChanged', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  334. smalltalk.ClassDefinitionChanged.comment="I am emitted when the defintion of a class changes.\x0aSee ClassBuilder >> #class:instanceVariableNames:"
  335. smalltalk.addClass('ClassMigrated', smalltalk.ClassAnnouncement, ['oldClass'], 'Kernel-Announcements');
  336. smalltalk.addMethod(
  337. smalltalk.method({
  338. selector: "oldClass",
  339. category: 'accessing',
  340. fn: function (){
  341. var self=this;
  342. return smalltalk.withContext(function($ctx1) {
  343. var $1;
  344. $1=self["@oldClass"];
  345. return $1;
  346. }, function($ctx1) {$ctx1.fill(self,"oldClass",{},smalltalk.ClassMigrated)})},
  347. args: [],
  348. source: "oldClass\x0a\x09^ oldClass",
  349. messageSends: [],
  350. referencedClasses: []
  351. }),
  352. smalltalk.ClassMigrated);
  353. smalltalk.addMethod(
  354. smalltalk.method({
  355. selector: "oldClass:",
  356. category: 'accessing',
  357. fn: function (aClass){
  358. var self=this;
  359. return smalltalk.withContext(function($ctx1) {
  360. self["@oldClass"]=aClass;
  361. return self}, function($ctx1) {$ctx1.fill(self,"oldClass:",{aClass:aClass},smalltalk.ClassMigrated)})},
  362. args: ["aClass"],
  363. source: "oldClass: aClass\x0a\x09oldClass := aClass",
  364. messageSends: [],
  365. referencedClasses: []
  366. }),
  367. smalltalk.ClassMigrated);
  368. smalltalk.addClass('ClassMoved', smalltalk.ClassAnnouncement, ['oldPackage'], 'Kernel-Announcements');
  369. smalltalk.addMethod(
  370. smalltalk.method({
  371. selector: "oldPackage",
  372. category: 'accessing',
  373. fn: function (){
  374. var self=this;
  375. return smalltalk.withContext(function($ctx1) {
  376. var $1;
  377. $1=self["@oldPackage"];
  378. return $1;
  379. }, function($ctx1) {$ctx1.fill(self,"oldPackage",{},smalltalk.ClassMoved)})},
  380. args: [],
  381. source: "oldPackage\x0a\x09^ oldPackage",
  382. messageSends: [],
  383. referencedClasses: []
  384. }),
  385. smalltalk.ClassMoved);
  386. smalltalk.addMethod(
  387. smalltalk.method({
  388. selector: "oldPackage:",
  389. category: 'accessing',
  390. fn: function (aPackage){
  391. var self=this;
  392. return smalltalk.withContext(function($ctx1) {
  393. self["@oldPackage"]=aPackage;
  394. return self}, function($ctx1) {$ctx1.fill(self,"oldPackage:",{aPackage:aPackage},smalltalk.ClassMoved)})},
  395. args: ["aPackage"],
  396. source: "oldPackage: aPackage\x0a\x09oldPackage := aPackage",
  397. messageSends: [],
  398. referencedClasses: []
  399. }),
  400. smalltalk.ClassMoved);
  401. smalltalk.addClass('ClassRemoved', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  402. smalltalk.ClassRemoved.comment="I am emitted when a class is removed.\x0aSee Smalltalk >> #removeClass:"
  403. smalltalk.addClass('ClassRenamed', smalltalk.ClassAnnouncement, [], 'Kernel-Announcements');
  404. smalltalk.ClassRenamed.comment="I am emitted when a class is renamed.\x0aSee ClassBuilder >> #renameClass:to:"
  405. smalltalk.addClass('MethodAnnouncement', smalltalk.SystemAnnouncement, ['method'], 'Kernel-Announcements');
  406. smalltalk.addMethod(
  407. smalltalk.method({
  408. selector: "method",
  409. category: 'accessing',
  410. fn: function (){
  411. var self=this;
  412. return smalltalk.withContext(function($ctx1) {
  413. var $1;
  414. $1=self["@method"];
  415. return $1;
  416. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodAnnouncement)})},
  417. args: [],
  418. source: "method\x0a\x09^ method",
  419. messageSends: [],
  420. referencedClasses: []
  421. }),
  422. smalltalk.MethodAnnouncement);
  423. smalltalk.addMethod(
  424. smalltalk.method({
  425. selector: "method:",
  426. category: 'accessing',
  427. fn: function (aCompiledMethod){
  428. var self=this;
  429. return smalltalk.withContext(function($ctx1) {
  430. self["@method"]=aCompiledMethod;
  431. return self}, function($ctx1) {$ctx1.fill(self,"method:",{aCompiledMethod:aCompiledMethod},smalltalk.MethodAnnouncement)})},
  432. args: ["aCompiledMethod"],
  433. source: "method: aCompiledMethod\x0a\x09method := aCompiledMethod",
  434. messageSends: [],
  435. referencedClasses: []
  436. }),
  437. smalltalk.MethodAnnouncement);
  438. smalltalk.addClass('MethodAdded', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  439. smalltalk.addClass('MethodModified', smalltalk.MethodAnnouncement, ['oldMethod'], 'Kernel-Announcements');
  440. smalltalk.addMethod(
  441. smalltalk.method({
  442. selector: "oldMethod",
  443. category: 'accessing',
  444. fn: function (){
  445. var self=this;
  446. return smalltalk.withContext(function($ctx1) {
  447. var $1;
  448. $1=self["@oldMethod"];
  449. return $1;
  450. }, function($ctx1) {$ctx1.fill(self,"oldMethod",{},smalltalk.MethodModified)})},
  451. args: [],
  452. source: "oldMethod\x0a\x09^ oldMethod",
  453. messageSends: [],
  454. referencedClasses: []
  455. }),
  456. smalltalk.MethodModified);
  457. smalltalk.addMethod(
  458. smalltalk.method({
  459. selector: "oldMethod:",
  460. category: 'accessing',
  461. fn: function (aMethod){
  462. var self=this;
  463. return smalltalk.withContext(function($ctx1) {
  464. self["@oldMethod"]=aMethod;
  465. return self}, function($ctx1) {$ctx1.fill(self,"oldMethod:",{aMethod:aMethod},smalltalk.MethodModified)})},
  466. args: ["aMethod"],
  467. source: "oldMethod: aMethod\x0a\x09oldMethod := aMethod",
  468. messageSends: [],
  469. referencedClasses: []
  470. }),
  471. smalltalk.MethodModified);
  472. smalltalk.addClass('MethodMoved', smalltalk.MethodAnnouncement, ['oldProtocol'], 'Kernel-Announcements');
  473. smalltalk.addMethod(
  474. smalltalk.method({
  475. selector: "oldProtocol",
  476. category: 'accessing',
  477. fn: function (){
  478. var self=this;
  479. return smalltalk.withContext(function($ctx1) {
  480. var $1;
  481. $1=self["@oldProtocol"];
  482. return $1;
  483. }, function($ctx1) {$ctx1.fill(self,"oldProtocol",{},smalltalk.MethodMoved)})},
  484. args: [],
  485. source: "oldProtocol\x0a\x09^ oldProtocol",
  486. messageSends: [],
  487. referencedClasses: []
  488. }),
  489. smalltalk.MethodMoved);
  490. smalltalk.addMethod(
  491. smalltalk.method({
  492. selector: "oldProtocol:",
  493. category: 'accessing',
  494. fn: function (aString){
  495. var self=this;
  496. return smalltalk.withContext(function($ctx1) {
  497. self["@oldProtocol"]=aString;
  498. return self}, function($ctx1) {$ctx1.fill(self,"oldProtocol:",{aString:aString},smalltalk.MethodMoved)})},
  499. args: ["aString"],
  500. source: "oldProtocol: aString\x0a\x09oldProtocol := aString",
  501. messageSends: [],
  502. referencedClasses: []
  503. }),
  504. smalltalk.MethodMoved);
  505. smalltalk.addClass('MethodRemoved', smalltalk.MethodAnnouncement, [], 'Kernel-Announcements');
  506. smalltalk.addClass('PackageAnnouncement', smalltalk.SystemAnnouncement, ['package'], 'Kernel-Announcements');
  507. smalltalk.addMethod(
  508. smalltalk.method({
  509. selector: "package",
  510. category: 'accessing',
  511. fn: function (){
  512. var self=this;
  513. return smalltalk.withContext(function($ctx1) {
  514. var $1;
  515. $1=self["@package"];
  516. return $1;
  517. }, function($ctx1) {$ctx1.fill(self,"package",{},smalltalk.PackageAnnouncement)})},
  518. args: [],
  519. source: "package\x0a\x09^ package",
  520. messageSends: [],
  521. referencedClasses: []
  522. }),
  523. smalltalk.PackageAnnouncement);
  524. smalltalk.addMethod(
  525. smalltalk.method({
  526. selector: "package:",
  527. category: 'accessing',
  528. fn: function (aPackage){
  529. var self=this;
  530. return smalltalk.withContext(function($ctx1) {
  531. self["@package"]=aPackage;
  532. return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage},smalltalk.PackageAnnouncement)})},
  533. args: ["aPackage"],
  534. source: "package: aPackage\x0a\x09package := aPackage",
  535. messageSends: [],
  536. referencedClasses: []
  537. }),
  538. smalltalk.PackageAnnouncement);
  539. smalltalk.addClass('PackageAdded', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  540. smalltalk.addClass('PackageRemoved', smalltalk.PackageAnnouncement, [], 'Kernel-Announcements');
  541. smalltalk.addClass('ProtocolAnnouncement', smalltalk.SystemAnnouncement, ['theClass', 'protocol'], 'Kernel-Announcements');
  542. smalltalk.addMethod(
  543. smalltalk.method({
  544. selector: "protocol",
  545. category: 'accessing',
  546. fn: function (){
  547. var self=this;
  548. return smalltalk.withContext(function($ctx1) {
  549. var $1;
  550. $1=self["@protocol"];
  551. return $1;
  552. }, function($ctx1) {$ctx1.fill(self,"protocol",{},smalltalk.ProtocolAnnouncement)})},
  553. args: [],
  554. source: "protocol\x0a\x09^ protocol",
  555. messageSends: [],
  556. referencedClasses: []
  557. }),
  558. smalltalk.ProtocolAnnouncement);
  559. smalltalk.addMethod(
  560. smalltalk.method({
  561. selector: "protocol:",
  562. category: 'accessing',
  563. fn: function (aString){
  564. var self=this;
  565. return smalltalk.withContext(function($ctx1) {
  566. self["@protocol"]=aString;
  567. return self}, function($ctx1) {$ctx1.fill(self,"protocol:",{aString:aString},smalltalk.ProtocolAnnouncement)})},
  568. args: ["aString"],
  569. source: "protocol: aString\x0a\x09protocol := aString",
  570. messageSends: [],
  571. referencedClasses: []
  572. }),
  573. smalltalk.ProtocolAnnouncement);
  574. smalltalk.addMethod(
  575. smalltalk.method({
  576. selector: "theClass",
  577. category: 'accessing',
  578. fn: function (){
  579. var self=this;
  580. return smalltalk.withContext(function($ctx1) {
  581. var $1;
  582. $1=self["@theClass"];
  583. return $1;
  584. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ProtocolAnnouncement)})},
  585. args: [],
  586. source: "theClass\x0a\x09^ theClass",
  587. messageSends: [],
  588. referencedClasses: []
  589. }),
  590. smalltalk.ProtocolAnnouncement);
  591. smalltalk.addMethod(
  592. smalltalk.method({
  593. selector: "theClass:",
  594. category: 'accessing',
  595. fn: function (aClass){
  596. var self=this;
  597. return smalltalk.withContext(function($ctx1) {
  598. self["@theClass"]=aClass;
  599. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ProtocolAnnouncement)})},
  600. args: ["aClass"],
  601. source: "theClass: aClass\x0a\x09theClass := aClass",
  602. messageSends: [],
  603. referencedClasses: []
  604. }),
  605. smalltalk.ProtocolAnnouncement);
  606. smalltalk.addClass('ProtocolAdded', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');
  607. smalltalk.addClass('ProtocolRemoved', smalltalk.ProtocolAnnouncement, [], 'Kernel-Announcements');