unageanu-jiji 1.1.4 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. data/ChangeLog +24 -1
  2. data/README +0 -0
  3. data/base/shared_lib/moving_average.rb +34 -33
  4. data/base/shared_lib/system/cross.rb +76 -0
  5. data/base/shared_lib/system/position_manager.rb +160 -0
  6. data/base/shared_lib/system/signal.rb +347 -0
  7. data/html/css/datatable.css +4 -4
  8. data/html/css/default.css +57 -5
  9. data/html/css/treeview.css +205 -0
  10. data/html/img/bin_closed.png +0 -0
  11. data/html/img/bin_empty.png +0 -0
  12. data/html/img/button_add_small.gif +0 -0
  13. data/html/img/button_add_small_gray.gif +0 -0
  14. data/html/img/button_add_small_over.gif +0 -0
  15. data/html/img/button_mkcol.gif +0 -0
  16. data/html/img/button_mkcol_gray.gif +0 -0
  17. data/html/img/button_mkcol_over.gif +0 -0
  18. data/html/img/button_remove_small.gif +0 -0
  19. data/html/img/button_remove_small_gray.gif +0 -0
  20. data/html/img/button_remove_small_over.gif +0 -0
  21. data/html/img/button_rename.gif +0 -0
  22. data/html/img/button_rename_gray.gif +0 -0
  23. data/html/img/button_rename_over.gif +0 -0
  24. data/html/img/control_play.png +0 -0
  25. data/html/img/control_play_blue.png +0 -0
  26. data/html/img/folder.png +0 -0
  27. data/html/img/folder_brick.png +0 -0
  28. data/html/img/folder_user.png +0 -0
  29. data/html/{js/codepress/images → img}/line-numbers.png +0 -0
  30. data/html/img/page_white_ruby.png +0 -0
  31. data/html/img/sidebar_agent_edit.png +0 -0
  32. data/html/img/sidebar_agent_edit_over.png +0 -0
  33. data/html/img/sidebar_agent_edit_s.png +0 -0
  34. data/html/img/yui/treeview-sprite.gif +0 -0
  35. data/html/index.html +34 -18
  36. data/html/js/agent-editor/agent-editor-page.js +324 -0
  37. data/html/js/agent-editor/agent-editor.js +363 -0
  38. data/html/js/agent-editor/agent-list-tree.js +251 -0
  39. data/html/js/agent-selector.js +23 -28
  40. data/html/js/app.js +63 -91
  41. data/html/js/bt-create-page.js +25 -19
  42. data/html/js/container-min.js +1 -1
  43. data/html/js/container.js +944 -0
  44. data/html/js/edit_area/autocompletion.js +11 -13
  45. data/html/js/edit_area/edit_area.css +79 -40
  46. data/html/js/edit_area/edit_area.js +255 -226
  47. data/html/js/edit_area/edit_area_compressor.php +4 -4
  48. data/html/js/edit_area/edit_area_full.gz +0 -0
  49. data/html/js/edit_area/edit_area_full.js +31 -31
  50. data/html/js/edit_area/edit_area_full_with_plugins.gz +0 -0
  51. data/html/js/edit_area/edit_area_full_with_plugins.js +31 -31
  52. data/html/js/edit_area/edit_area_functions.js +448 -341
  53. data/html/js/edit_area/edit_area_loader.js +409 -397
  54. data/html/js/edit_area/elements_functions.js +120 -123
  55. data/html/js/edit_area/highlight.js +305 -197
  56. data/html/js/edit_area/images/goto.png +0 -0
  57. data/html/js/edit_area/images/help.png +0 -0
  58. data/html/js/edit_area/images/redo.png +0 -0
  59. data/html/js/edit_area/images/save.png +0 -0
  60. data/html/js/edit_area/images/search.png +0 -0
  61. data/html/js/edit_area/images/undo.png +0 -0
  62. data/html/js/edit_area/images/word_wrap.gif +0 -0
  63. data/html/js/edit_area/keyboard.js +5 -5
  64. data/html/js/edit_area/langs/bg.js +73 -0
  65. data/html/js/edit_area/langs/cs.js +2 -0
  66. data/html/js/edit_area/langs/de.js +2 -0
  67. data/html/js/edit_area/langs/dk.js +2 -0
  68. data/html/js/edit_area/langs/en.js +2 -0
  69. data/html/js/edit_area/langs/eo.js +2 -0
  70. data/html/js/edit_area/langs/es.js +2 -0
  71. data/html/js/edit_area/langs/fi.js +67 -0
  72. data/html/js/edit_area/langs/fr.js +2 -0
  73. data/html/js/edit_area/langs/hr.js +2 -0
  74. data/html/js/edit_area/langs/it.js +2 -0
  75. data/html/js/edit_area/langs/ja.js +2 -0
  76. data/html/js/edit_area/langs/mk.js +2 -0
  77. data/html/js/edit_area/langs/nl.js +2 -0
  78. data/html/js/edit_area/langs/pl.js +2 -0
  79. data/html/js/edit_area/langs/pt.js +2 -0
  80. data/html/js/edit_area/langs/ru.js +2 -0
  81. data/html/js/edit_area/langs/sk.js +2 -0
  82. data/html/js/edit_area/langs/zh.js +67 -0
  83. data/html/js/edit_area/manage_area.js +362 -205
  84. data/html/js/edit_area/plugins/charmap/langs/bg.js +12 -0
  85. data/html/js/edit_area/plugins/charmap/langs/zh.js +6 -0
  86. data/html/js/edit_area/plugins/test/langs/bg.js +10 -0
  87. data/html/js/edit_area/plugins/test/langs/zh.js +4 -0
  88. data/html/js/edit_area/reg_syntax/java.js +56 -0
  89. data/html/js/edit_area/reg_syntax/ruby.js +9 -9
  90. data/html/js/edit_area/reg_syntax.js +15 -13
  91. data/html/js/edit_area/regexp.js +36 -32
  92. data/html/js/edit_area/resize_area.js +43 -47
  93. data/html/js/edit_area/search_replace.js +29 -29
  94. data/html/js/edit_area/template.html +6 -4
  95. data/html/js/json-broker-client.js +23 -17
  96. data/html/js/result-page.js +107 -57
  97. data/html/js/rt-setting-page.js +38 -15
  98. data/html/js/sidebar.js +41 -27
  99. data/html/js/templates.js +167 -32
  100. data/html/js/utils.js +143 -7
  101. data/html/js/yui/treeview.js +3671 -0
  102. data/html/swf/chart.swf +0 -0
  103. data/html/test/agent_editor_spec.js +815 -0
  104. data/html/test/index.html +40 -0
  105. data/html/test/jsspec/JSSpec.css +224 -0
  106. data/html/test/jsspec/JSSpec.js +1549 -0
  107. data/html/test/jsspec/diff_match_patch.js +1 -0
  108. data/html/test/utils_spec.js +111 -0
  109. data/lib/jiji/agent/agent.rb +69 -12
  110. data/lib/jiji/agent/agent_manager.rb +18 -12
  111. data/lib/jiji/agent/agent_registry.rb +35 -121
  112. data/lib/jiji/collector.rb +16 -6
  113. data/lib/jiji/command.rb +46 -5
  114. data/lib/jiji/dao/file_system_dao.rb +158 -0
  115. data/lib/jiji/dao/timed_data_dao.rb +2 -0
  116. data/lib/jiji/dao/trade_result_dao.rb +1 -1
  117. data/lib/jiji/error.rb +24 -8
  118. data/lib/jiji/migration/migrator1_2_0.rb +67 -0
  119. data/lib/jiji/models.rb +82 -24
  120. data/lib/jiji/operator.rb +55 -51
  121. data/lib/jiji/output.rb +85 -29
  122. data/lib/jiji/output_manager.rb +84 -0
  123. data/lib/jiji/plugin/embedded/single_click_client.rb +2 -2
  124. data/lib/jiji/plugin/securities_plugin.rb +0 -1
  125. data/lib/jiji/process.rb +229 -208
  126. data/lib/jiji/process_manager.rb +190 -96
  127. data/lib/jiji/registry.rb +87 -19
  128. data/lib/jiji/server.rb +1 -0
  129. data/lib/jiji/service/agent_service.rb +147 -48
  130. data/lib/jiji/service/output_service.rb +37 -17
  131. data/lib/jiji/service/process_service.rb +3 -5
  132. data/lib/jiji/service/trade_result_service.rb +4 -5
  133. data/lib/jiji/util/file_lock.rb +4 -4
  134. data/lib/jiji/util/include_proxy.rb +17 -0
  135. data/lib/jiji/util/json_broker.rb +6 -4
  136. data/lib/jiji/util/util.rb +1 -1
  137. data/swf/chart/fx/chart/Chart.as +7 -0
  138. data/swf/chart/fx/chart/ui/graph/GraphManager.as +15 -2
  139. data/test/ProcessTest/agents/foo.rb +10 -0
  140. data/test/ProcessTest/conf/configuration.yaml +3 -0
  141. data/test/agent/agent_tests.rb +10 -0
  142. data/test/agent/test_AgentManager.rb +28 -12
  143. data/test/agent/test_AgentRegistry.rb +194 -99
  144. data/test/agent/test_PeriodicallyAgent.rb +1 -2
  145. data/test/agent/test_Permitter.rb +1 -2
  146. data/test/all_tests.rb +7 -19
  147. data/test/dao/dao_tests.rb +9 -0
  148. data/test/dao/test_FileSystemDao.rb +431 -0
  149. data/test/dao/test_RateDao.rb +5 -7
  150. data/test/dao/test_TradeResultDao.rb +1 -2
  151. data/test/migration/migration_tests.rb +10 -0
  152. data/test/migration/migrator1_2_0test_data/basic/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/meta.yaml +8 -0
  153. data/test/migration/migrator1_2_0test_data/basic/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/meta.yaml +8 -0
  154. data/test/migration/migrator1_2_0test_data/basic/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/meta.yaml +8 -0
  155. data/test/migration/migrator1_2_0test_data/basic/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/meta.yaml +9 -0
  156. data/test/migration/migrator1_2_0test_data/basic/props.yaml +85 -0
  157. data/test/migration/migrator1_2_0test_data/illegal_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/meta.yaml +8 -0
  158. data/test/migration/migrator1_2_0test_data/illegal_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/meta.yaml +8 -0
  159. data/test/migration/migrator1_2_0test_data/illegal_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/meta.yaml +8 -0
  160. data/test/migration/migrator1_2_0test_data/illegal_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/meta.yaml +9 -0
  161. data/test/migration/migrator1_2_0test_data/illegal_props/props.yaml +1 -0
  162. data/test/migration/migrator1_2_0test_data/no_outs/props.yaml +85 -0
  163. data/test/migration/migrator1_2_0test_data/no_props/out/M2NlOTA2ODEtZDdlNi00NWU1LWIwNDQtMjBmODY2ZGNkNzBj/56e75YuV5bmz5Z2H57ea/meta.yaml +8 -0
  164. data/test/migration/migrator1_2_0test_data/no_props/out/MDVhYzcxMjYtMGFlMS00Mzk0LWEyNmUtYjVjZjgwNDA0ZmE2/56e75YuV5bmz5Z2H57ea/meta.yaml +8 -0
  165. data/test/migration/migrator1_2_0test_data/no_props/out/MzA1YTk0NDgtNzhjNi00NDk3LTk2NTktYzE1ZjBhNzdiYjNj/56e75YuV5bmz5Z2H57ea/meta.yaml +8 -0
  166. data/test/migration/migrator1_2_0test_data/no_props/out/YjRkOTI1MzEtZTM4MS00YjQwLTg1ZTQtMWFmZDRlNDUwMzBm/56e75YuV5bmz5Z2H57ea/meta.yaml +9 -0
  167. data/test/migration/test_Migrator.rb +1 -1
  168. data/test/migration/test_Migrator1_0_3.rb +1 -1
  169. data/test/migration/test_Migrator1_1_0.rb +1 -1
  170. data/test/migration/test_Migrator1_2_0.rb +94 -0
  171. data/test/plugin/embedded/test_SingleClickClient.rb +1 -2
  172. data/test/plugin/plugin_tests.rb +8 -0
  173. data/test/plugin/test_Loader.rb +1 -1
  174. data/test/shared/rate.csv +144 -0
  175. data/test/shared/shared_tests.rb +9 -0
  176. data/test/shared/test_Cross.rb +144 -0
  177. data/test/shared/test_PositionManager.rb +285 -0
  178. data/test/shared/test_Signal.rb +65 -0
  179. data/test/test_Output.rb +28 -21
  180. data/test/test_OutputManager.rb +162 -0
  181. data/test/test_Output_registry.rb +6 -17
  182. data/test/test_Process.rb +434 -222
  183. data/test/test_ProcessManager.rb +458 -101
  184. data/test/test_utils.rb +71 -8
  185. data/test/util/test_BlockToSession.rb +1 -2
  186. data/test/util/test_CSV.rb +1 -2
  187. data/test/util/test_SynchronizeInterceptor.rb +1 -2
  188. data/test/util/util_tests.rb +9 -0
  189. metadata +127 -47
  190. data/html/js/agent-editor-page.js +0 -440
  191. data/html/js/codepress/codepress.css +0 -21
  192. data/html/js/codepress/codepress.html +0 -35
  193. data/html/js/codepress/codepress.js +0 -138
  194. data/html/js/codepress/engines/gecko.js +0 -293
  195. data/html/js/codepress/engines/khtml.js +0 -0
  196. data/html/js/codepress/engines/msie.js +0 -304
  197. data/html/js/codepress/engines/older.js +0 -0
  198. data/html/js/codepress/engines/opera.js +0 -260
  199. data/html/js/codepress/images/line-numbers.gif +0 -0
  200. data/html/js/codepress/index.html +0 -443
  201. data/html/js/codepress/languages/asp.css +0 -71
  202. data/html/js/codepress/languages/asp.js +0 -117
  203. data/html/js/codepress/languages/autoit.css +0 -13
  204. data/html/js/codepress/languages/autoit.js +0 -32
  205. data/html/js/codepress/languages/csharp.css +0 -9
  206. data/html/js/codepress/languages/csharp.js +0 -25
  207. data/html/js/codepress/languages/css.css +0 -10
  208. data/html/js/codepress/languages/css.js +0 -23
  209. data/html/js/codepress/languages/generic.css +0 -9
  210. data/html/js/codepress/languages/generic.js +0 -25
  211. data/html/js/codepress/languages/html.css +0 -13
  212. data/html/js/codepress/languages/html.js +0 -59
  213. data/html/js/codepress/languages/java.css +0 -7
  214. data/html/js/codepress/languages/java.js +0 -24
  215. data/html/js/codepress/languages/javascript.css +0 -8
  216. data/html/js/codepress/languages/javascript.js +0 -30
  217. data/html/js/codepress/languages/perl.css +0 -11
  218. data/html/js/codepress/languages/perl.js +0 -27
  219. data/html/js/codepress/languages/php.css +0 -12
  220. data/html/js/codepress/languages/php.js +0 -61
  221. data/html/js/codepress/languages/ruby.css +0 -10
  222. data/html/js/codepress/languages/ruby.js +0 -26
  223. data/html/js/codepress/languages/sql.css +0 -10
  224. data/html/js/codepress/languages/sql.js +0 -30
  225. data/html/js/codepress/languages/text.css +0 -5
  226. data/html/js/codepress/languages/text.js +0 -9
  227. data/html/js/codepress/languages/vbscript.css +0 -71
  228. data/html/js/codepress/languages/vbscript.js +0 -117
  229. data/html/js/codepress/languages/xsl.css +0 -15
  230. data/html/js/codepress/languages/xsl.js +0 -103
  231. data/html/js/codepress/license.txt +0 -458
  232. data/html/js/edit_area/images/Thumbs.db +0 -0
  233. data/test/plugin/test_gem/a/lib/jiji_plugin_test.rb +0 -6
@@ -5,12 +5,13 @@ namespace( "fx.ui.pages" )
5
5
  // バックテスト作成画面
6
6
  fx.ui.pages.BtCreatePage = function() {
7
7
  this.elementId = null // @Inject
8
- this.processServiceStub = null; //@Inject
9
- this.rateServiceStub = null; //@Inject
8
+ this.processServiceStub = container.Inject;
9
+ this.rateServiceStub = container.Inject;
10
10
 
11
- this.agentSelector = null; //@Inject
12
- this.dialog = null; // @Inject
13
- this.topicPath = null; // @Inject
11
+ this.agentSelector = container.Inject("btCreateAgentSelector");
12
+ this.dialog = container.Inject;
13
+ this.topicPath = container.Inject;
14
+ this.sideBar = container.Inject;
14
15
 
15
16
  // ボタン
16
17
  var self = this;
@@ -20,9 +21,11 @@ fx.ui.pages.BtCreatePage = function() {
20
21
  this.startButton.setEnable( true );
21
22
 
22
23
  // カレンダー
23
- this.startCalendar = new util.DateInput( "bt-create_range-start", "開始日" );
24
+ this.startCalendar = new util.DateInput( "bt-create_range-start",
25
+ fx.template.Templates.btcreate.calendar.start );
24
26
  this.startCalendar.initialize();
25
- this.endCalendar = new util.DateInput( "bt-create_range-end", "終了日");
27
+ this.endCalendar = new util.DateInput( "bt-create_range-end",
28
+ fx.template.Templates.btcreate.calendar.end );
26
29
  this.endCalendar.initialize();
27
30
  }
28
31
  fx.ui.pages.BtCreatePage.prototype = {
@@ -62,13 +65,15 @@ fx.ui.pages.BtCreatePage.prototype = {
62
65
  fx.template.Templates.common.loading;
63
66
 
64
67
  this.rateServiceStub.range( "EURJPY", function(range) {
65
- self.startCalendar = new util.DateInput( "bt-create_range-start", "開始日",
68
+ self.startCalendar = new util.DateInput( "bt-create_range-start",
69
+ fx.template.Templates.btcreate.calendar.start,
66
70
  range.first*1000, range.last*1000 );
67
71
  self.startCalendar.initialize();
68
72
  var f = function(){ self.dateChanged();};
69
73
  self.startCalendar.listener.addListener( "selected", f );
70
74
  self.startCalendar.listener.addListener( "blur", f );
71
- self.endCalendar = new util.DateInput( "bt-create_range-end", "終了日",
75
+ self.endCalendar = new util.DateInput( "bt-create_range-end",
76
+ fx.template.Templates.btcreate.calendar.end,
72
77
  range.first*1000, range.last*1000 );
73
78
  self.endCalendar.initialize();
74
79
  self.endCalendar.listener.addListener( "selected", f );
@@ -93,7 +98,7 @@ fx.ui.pages.BtCreatePage.prototype = {
93
98
  // エラーチェック
94
99
  if ( this.agentSelector.hasError() ) {
95
100
  this.dialog.show( "warn", {
96
- message : "エージェントの設定に問題があります。",
101
+ message : fx.template.Templates.common.errorMsg.illegalAgentSetting,
97
102
  buttons : [
98
103
  { type:"ok", alt: fx.template.Templates.common.button.ok, key: "Enter" }
99
104
  ]
@@ -105,7 +110,7 @@ fx.ui.pages.BtCreatePage.prototype = {
105
110
  var name = document.getElementById("bt-create_name").value;
106
111
  if ( !name ) {
107
112
  this.dialog.show( "warn", {
108
- message : "名前が入力されていません。",
113
+ message : fx.template.Templates.common.errorMsg.emptyName,
109
114
  buttons : [ { type:"ok", alt: fx.template.Templates.common.button.ok, key: "Enter" }]
110
115
  } );
111
116
  return;
@@ -115,7 +120,7 @@ fx.ui.pages.BtCreatePage.prototype = {
115
120
  var startDate = this.startCalendar.getDate();
116
121
  if ( !startDate ) {
117
122
  this.dialog.show( "warn", {
118
- message : "開始日が入力されていないか、フォーマットが不正です。",
123
+ message : fx.template.Templates.common.errorMsg.illegalStartDate,
119
124
  buttons : [ { type:"ok", alt: fx.template.Templates.common.button.ok, key: "Enter" }]
120
125
  } );
121
126
  return;
@@ -124,14 +129,14 @@ fx.ui.pages.BtCreatePage.prototype = {
124
129
  var endDate = this.endCalendar.getDate();
125
130
  if ( !endDate ) {
126
131
  this.dialog.show( "warn", {
127
- message : "終了日が入力されていないか、フォーマットが不正です。",
132
+ message : fx.template.Templates.common.errorMsg.illegalEndDate,
128
133
  buttons : [{ type:"ok", alt: fx.template.Templates.common.button.ok, key: "Enter" }]
129
134
  } );
130
135
  return;
131
136
  }
132
137
  if ( endDate.getTime() <= startDate.getTime() ) {
133
138
  this.dialog.show( "warn", {
134
- message : "開始日または終了日が不正です。",
139
+ message : fx.template.Templates.common.errorMsg.illegalDate,
135
140
  buttons : [{ type:"ok", alt: fx.template.Templates.common.button.ok, key: "Enter" }]
136
141
  } );
137
142
  return;
@@ -141,7 +146,7 @@ fx.ui.pages.BtCreatePage.prototype = {
141
146
  // ダイアログを開く
142
147
  var self = this;
143
148
  this.dialog.show( "input", {
144
- message : "バックテストを開始します。よろしいですか?<br/>",
149
+ message : fx.template.Templates.btcreate.start.msg,
145
150
  buttons : [
146
151
  { type:"ok",
147
152
  alt: fx.template.Templates.common.button.ok,
@@ -157,13 +162,14 @@ fx.ui.pages.BtCreatePage.prototype = {
157
162
  // 更新時刻を表示
158
163
  var dateStr = util.formatDate( new Date(info.create_date*1000) );
159
164
  var msg = document.getElementById("bt-create_msg");
160
- msg.innerHTML = "※開始しました。( " + dateStr + " )";
165
+ msg.innerHTML = fx.template.Templates.btcreate.start.success.evaluate( {dateStr:dateStr} );
161
166
  msg.style.display = "block";
162
- }, function(error){
167
+ }, function(error,detail){
163
168
  self.dialog.show( "warn", {
164
- message : fx.template.Templates.btcreate.start.error.evaluate({"error":error[0].error.escapeHTML()})
169
+ message : fx.template.Templates.btcreate.start.error.evaluate({
170
+ "error":(String(error) + "\n" + String(detail["backtrace"])).escapeHTML()})
165
171
  });
166
- } );
172
+ });
167
173
  } },
168
174
  { type:"cancel", alt: fx.template.Templates.common.button.cancel, key: "Esc" }
169
175
  ]
@@ -1 +1 @@
1
- if(typeof container=="undefined"){container={}}container.VERSION="0.3.0";container.Container=function(B){var A=new container.Binder({});B(A);this.defs=A.defs;this.creating=[];this.typeCache={};this.nameCache={};var C=this;this.eachComponentDef(function(E){if(E&&E[container.Annotation.Container]&&E[container.Annotation.Container][container.Annotation.Scope]==container.Scope.EagerSingleton){C.create(E)}if(E&&E[container.Annotation.Container]&&E[container.Annotation.Container][container.Annotation.Name]){var D=E[container.Annotation.Container][container.Annotation.Name];if(!C.nameCache[D]){C.nameCache[D]=[]}C.nameCache[D].push(E)}})};container.Container.prototype={get:function(A){if(A instanceof container.Type){if(!this.typeCache[A]){this._createTypeCahce(A)}if(this.typeCache[A].length>0){return this.create(this.typeCache[A][0])}else{throw container.createError(new Error(),container.ErrorCode.ComponentNotFound,"compoent not found.",{"type":A})}}else{if(this.nameCache[A]&&this.nameCache[A].length>0){return this.create(this.nameCache[A][0])}else{throw container.createError(new Error(),container.ErrorCode.ComponentNotFound,"compoent not found.",{"name":A})}}},gets:function(D){var C=[];if(D instanceof container.Type){if(!this.typeCache[D]){this._createTypeCahce(D)}var A=this.typeCache[D];for(var B=0;B<A.length;B++){C.push(this.create(A[B]))}}else{if(this.nameCache[D]){var A=this.nameCache[D];for(var B=0;B<A.length;B++){C.push(this.create(A[B]))}}}return C},destroy:function(){var A=this;this.eachComponentDef(function(D){if(!D.instance){return }var E=D.instance;var B=D[container.Annotation.Container];if(!B||!B[container.Annotation.Destroy]){return }var C=B[container.Annotation.Destroy];if(typeof C=="string"){E[C].apply(E,[this])}else{if(typeof C=="function"){C(E,A)}else{throw container.createError(new Error(),container.ErrorCode.IllegalDefinition,"illegal destroy method. string or function is supported.",{"def":D})}}D.instance=null})},create:function(A){if(A.instance){return A.instance}if(this._isCreating(A)){throw container.createError(new Error(),container.ErrorCode.CircularReference,"circulative component creation.",{"def":A})}try{this.creating.push(A);var E=A.constractor(this);A.instance=E;var C=A[container.Annotation.Container]||{};if(C[container.Annotation.Inject]){var H=C[container.Annotation.Inject];for(var I in H){if(H[I] instanceof container.inner.Component){E[I]=this.get(H[I].name)}else{if(H[I] instanceof container.inner.Components){E[I]=this.gets(H[I].name)}else{if(H[I] instanceof container.inner.Provider){E[I]=H[I].func(E,this)}else{E[I]=H[I]}}}}}if(C[container.Annotation.Initialize]){var G=C[container.Annotation.Initialize];if(typeof G=="string"){E[G].apply(E,[this])}else{if(typeof G=="function"){G(E,this)}else{throw container.createError(new Error(),container.ErrorCode.IllegalDefinition,"illegal initialize method. string or function is supported.",{"def":A})}}}if(C[container.Annotation.Intercept]){var B=C[container.Annotation.Intercept];for(var F=0;F<B.length;F++){this.applyInterceptor(E,B[F][0],B[F][1])}}if(this.defs.interceptors&&A.componentType!="function"){for(var F=0;F<this.defs.interceptors.length;F++){var D=this.defs.interceptors[F];if(!D.nameMatcher){continue}if(D.nameMatcher instanceof container.Type&&D.nameMatcher.isImplementor(E)){this.applyInterceptor(E,D.interceptor,D.methodMatcher)}else{if(D.nameMatcher instanceof container.Matcher&&C[container.Annotation.Name]&&D.nameMatcher.match(C[container.Annotation.Name])){this.applyInterceptor(E,D.interceptor,D.methodMatcher)}}}}if(C[container.Annotation.Scope]==container.Scope.Prototype){A.instance=undefined}return E}catch(J){A.instance=undefined;throw J}finally{this.creating.pop()}},applyInterceptor:function(D,C,B){if(!C||!B){return }for(var A in D){if(typeof D[A]=="function"&&B.match(A)){(function(){var E=A;var F=D[E];D[E]=function(){var G=new container.MethodInvocation(E,F,D,arguments);return C(G)}})()}}},eachComponentDef:function(B){for(var A=0;A<this.defs.objects.length;A++){if(B){B.apply(null,[this.defs.objects[A]])}}},_createTypeCahce:function(C){var B=[];var A=this;this.eachComponentDef(function(D){if(A._isCreating(D)&&!D.instance){return }var E=A.create(D);if(C.isImplementor(E)){B.push(D)}});this.typeCache[C]=B},_isCreating:function(B){for(var A=0;A<this.creating.length;A++){if(B===this.creating[A]){return true}}return false}};container.Binder=function(A,B){this.defs=A;this.namespace=B};container.Binder.prototype={bind:function(A){return this._bind("object",A.prototype.meta,function(){return new A()})},bindMethod:function(C,B){var A=this;return this._bind("function",null,function(D){var E=D.get(C);if(!E){throw D.createError(new Error(),D.ErrorCode.ComponentNotFound,"component not found.",{"name":name})}return A._createBindMethod(E,B)})},bindMethods:function(C,B){var A=this;return this._bind("function",null,function(D){var G=D.gets(C);var F=[];for(var E=0;E<G.length;E++){F.push(A._createBindMethod(G[E],B))}return F})},bindProvider:function(A){return this._bind("object",null,A)},bindInstance:function(A){return this._bind("object",A.meta,function(){return A})},bindInterceptor:function(D,A,B){var C=this._getInterceptorDefs();C.push({"interceptor":D,"nameMatcher":A,"methodMatcher":B})},ns:function(B,A){if(this.namespace){B=this.namespace+"."+B}A(new container.Binder(this.defs,B))},_bind:function(A,E,B){var D=this._clone(E);D.constractor=B;D.componentType=A;var C=this._getObjectDefs();C.push(D);return new container.Builder(D,this.namespace)},_getObjectDefs:function(){if(!this.defs.objects){this.defs.objects=[]}return this.defs.objects},_getInterceptorDefs:function(){if(!this.defs.interceptors){this.defs.interceptors=[]}return this.defs.interceptors},_createBindMethod:function(B,A){return function(){return B[A].apply(B,arguments)}},_clone:function(F){var C={};if(F&&F[container.Annotation.Container]){F=F[container.Annotation.Container];var E=[container.Annotation.Name,container.Annotation.Inject,container.Annotation.Initialize,container.Annotation.Destroy,container.Annotation.Scope];for(var B=0;B<E.length;B++){C[E[B]]=F[E[B]]}C[container.Annotation.Intercept]=[];if(F[container.Annotation.Intercept]){var D=F[container.Annotation.Intercept];for(var B=0;B<D.length;B++){C[container.Annotation.Intercept].push(D[B])}}}var A={};A[container.Annotation.Container]=C;return A}};container.Builder=function(B,A){if(!B[container.Annotation.Container]){B[container.Annotation.Container]={}}this.def=B[container.Annotation.Container];if(!this.def[container.Annotation.Intercept]){this.def[container.Annotation.Intercept]=[]}this.namespace=A};container.Builder.prototype={to:function(A){if(this.namespace){A=this.namespace+"."+A}this.def[container.Annotation.Name]=A;return this},inject:function(A){this.def[container.Annotation.Inject]=A;return this},initialize:function(A){this.def[container.Annotation.Initialize]=A;return this},destroy:function(A){this.def[container.Annotation.Destroy]=A;return this},scope:function(A){this.def[container.Annotation.Scope]=A;return this},intercept:function(B,A){this.def[container.Annotation.Intercept].push([B,A]);return this}};container.Matcher=function(A,B){if(A&&!(A instanceof Array||A instanceof RegExp||A instanceof Function)){throw container.createError(new Error(),container.ErrorCode.IllegalArgument,"Illegal includes.",{})}if(B&&!(B instanceof Array||B instanceof RegExp||B instanceof Function)){throw container.createError(new Error(),container.ErrorCode.IllegalArgument,"Illegal excludes.",{})}this.excludes=B;this.includes=A};container.Matcher.prototype={match:function(A){if(this.excludes&&this.getEvaluator(this.excludes)(A)){return false}if(this.includes&&this.getEvaluator(this.includes)(A)){return true}return false},getEvaluator:function(A){if(A instanceof Array){return function(C){for(var B=0;B<A.length;B++){if(A[B] instanceof RegExp&&A[B].test(C)){return true}}return false}}else{if(A instanceof RegExp){return function(B){return A.test(B)}}else{if(A instanceof Function){return A}}}}};container.MethodInvocation=function(B,C,D,A){this.name=B;this.original=C;this.arg=A;this.target=D};container.MethodInvocation.prototype={getThis:function(){return this.target},proceed:function(){return this.original.apply(this.target,this.arg)},getArguments:function(){return this.arg},getOriginalMethod:function(){return this.original},getMethodName:function(){return this.name}};container.inner={};container.inner.Component=function(A){this.name=A};container.inner.Components=function(A){this.name=A};container.inner.Provider=function(A){this.func=A};container.createError=function(B,D,C,A){B.errorCode=D;B.message=C;B.options=A;B.name="container.Exception";return B};container.ErrorCode={IllegalArgument:1,ComponentNotFound:100,IllegalDefinition:101,CircularReference:102};container.Annotation={Container:"@Container",Name:"@Name",Inject:"@Inject",Initialize:"@Initialize",Destroy:"@Destroy",Intercept:"@Intercept",Scope:"@Scope"};container.Scope={Singleton:"Singleton",Prototype:"Prototype",EagerSingleton:"EagerSingleton"};container.any=function(){return new container.Matcher(/.*/)};container.component=function(A){return new container.inner.Component(A)};container.components=function(A){return new container.inner.Components(A)};container.provides=function(A){return new container.inner.Provider(A)};container.Type=function(){};container.Type.prototype={equals:function(A){},isImplementor:function(A){}};container.types={has:function(){return new container.inner.types.And(container.types._createTypes(arguments))},hasAny:function(){return new container.inner.types.Or(container.types._createTypes(arguments))},not:function(A){return new container.inner.types.Not(container.types._createType(A))},_createTypes:function(C){var B=[];for(var A=0;A<C.length;A++){B.push(container.types._createType(C[A]))}return B},_createType:function(A){if(A instanceof RegExp){return new container.inner.types.RegexpMethod(A)}else{if(A instanceof container.Type){return A}else{if(typeof A=="string"){return new container.inner.types.Method(A)}else{throw"illegal argument."}}}}};container.inner.types={};container.inner.types.Method=function(A){this.name=A};container.inner.types.Method.prototype=new container.Type();container.inner.types.Method.prototype.equals=function(A){if(!A||!(A instanceof container.inner.types.Method)){return false}return this.name==A.name};container.inner.types.Method.prototype.isImplementor=function(A){return typeof A[this.name]=="function"};container.inner.types.Method.prototype.toString=function(){return"!container.inner.types.Method:"+this.name};container.inner.types.RegexpMethod=function(A){this.exp=A};container.inner.types.RegexpMethod.prototype=new container.Type();container.inner.types.RegexpMethod.prototype.equals=function(A){if(!A||!(A instanceof container.inner.types.RegexpMethod)){return false}return this.exp.ignoreCase==A.exp.ignoreCase&&this.exp.global==A.exp.global&&this.exp.source==A.exp.source};container.inner.types.RegexpMethod.prototype.isImplementor=function(B){for(var A in B){if(typeof B[A]=="function"&&this.exp.test(A)){return true}}return false};container.inner.types.RegexpMethod.prototype.toString=function(){return"!container.inner.types.RegexpMethod:/"+this.exp.source+"/"+this.exp.ignoreCase+"/"+this.exp.global};container.inner.types.And=function(A){this.types=A};container.inner.types.And.prototype=new container.Type();container.inner.types.And.prototype.equals=function(D){if(!D||!(D instanceof container.inner.types.And)){return false}if(this.types.length!=D.types.length){return false}for(var C=0;C<this.types.length;C++){var B=this.types[C];var A=D.types[C];if(!B.equals(A)){return false}}return true};container.inner.types.And.prototype.isImplementor=function(B){for(var A=0;A<this.types.length;A++){if(!this.types[A].isImplementor(B)){return false}}return true};container.inner.types.And.prototype.toString=function(){var B="!container.inner.types.And:[";for(var A=0;A<this.types.length;A++){B+=this.types[A].toString()+","}B+="]";return B};container.inner.types.Or=function(A){this.types=A};container.inner.types.Or.prototype=new container.Type();container.inner.types.Or.prototype.equals=function(D){if(!D||!(D instanceof container.inner.types.Or)){return false}if(this.types.length!=D.types.length){return false}for(var C=0;C<this.types.length;C++){var B=this.types[C];var A=D.types[C];if(!B.equals(A)){return false}}return true};container.inner.types.Or.prototype.isImplementor=function(B){for(var A=0;A<this.types.length;A++){if(this.types[A].isImplementor(B)){return true}}return false};container.inner.types.Or.prototype.toString=function(){var B="!container.inner.types.Or:[";for(var A=0;A<this.types.length;A++){B+=this.types[A].toString()+","}B+="]";return B};container.inner.types.Not=function(A){this.type=A};container.inner.types.Not.prototype=new container.Type();container.inner.types.Not.prototype.equals=function(A){if(!A||!(A instanceof container.inner.types.Not)){return false}return this.type.equals(A.type)};container.inner.types.Not.prototype.isImplementor=function(A){return !this.type.isImplementor(A)};container.inner.types.Not.prototype.toString=function(){return"!container.inner.types.Not:["+this.type.toString()+"]"}
1
+ if(typeof container=="undefined"){container={}}container.VERSION="0.4.0";container.Container=function(B){var A=new container.Binder({});B(A);this.defs=A.defs;this.creating=[];this.typeCache={};this.nameCache={};var C=this;this.eachComponentDef(function(E){if(E&&E[container.Annotation.Container]&&E[container.Annotation.Container][container.Annotation.Scope]==container.Scope.EagerSingleton){C.create(E)}if(E&&E[container.Annotation.Container]&&E[container.Annotation.Container][container.Annotation.Name]){var D=E[container.Annotation.Container][container.Annotation.Name];if(!C.nameCache[D]){C.nameCache[D]=[]}C.nameCache[D].push(E)}})};container.Container.prototype={get:function(A){if(A instanceof container.Type){if(!this.typeCache[A]){this._createTypeCahce(A)}if(this.typeCache[A].length>0){return this.create(this.typeCache[A][0])}else{throw container.createError(new Error(),container.ErrorCode.ComponentNotFound,"component not found.",{"type":A})}}else{if(this.nameCache[A]&&this.nameCache[A].length>0){return this.create(this.nameCache[A][0])}else{throw container.createError(new Error(),container.ErrorCode.ComponentNotFound,"component not found.",{"name":A})}}},gets:function(D){var C=[];if(D instanceof container.Type){if(!this.typeCache[D]){this._createTypeCahce(D)}var A=this.typeCache[D];for(var B=0;B<A.length;B++){C.push(this.create(A[B]))}}else{if(this.nameCache[D]){var A=this.nameCache[D];for(var B=0;B<A.length;B++){C.push(this.create(A[B]))}}}return C},destroy:function(){var A=this;this.eachComponentDef(function(D){if(!D.instance){return }var E=D.instance;var B=D[container.Annotation.Container];if(!B||!B[container.Annotation.Destroy]){return }var C=B[container.Annotation.Destroy];if(typeof C=="string"){E[C].apply(E,[this])}else{if(typeof C=="function"){C(E,A)}else{throw container.createError(new Error(),container.ErrorCode.IllegalDefinition,"illegal destroy method. string or function is supported.",{"def":D})}}D.instance=null})},create:function(A){if(A.instance){return A.instance}if(this._isCreating(A)){throw container.createError(new Error(),container.ErrorCode.CircularReference,"circulative component creation.",{"def":A})}try{this.creating.push(A);var F=A.constractor(this);A.instance=F;var C=A[container.Annotation.Container]||{};if(C[container.Annotation.AutoInjection]!=false){for(var K in F){if(F[K] instanceof container.inner.Component){F[K]=this.get(F[K].name)}else{if(F[K] instanceof container.inner.Components){F[K]=this.gets(F[K].name)}else{if(F[K]===container.Inject){F[K]=this.get(K)}else{if(F[K]===container.Injects){F[K]=this.gets(K)}}}}}}if(C[container.Annotation.Inject]){var H=C[container.Annotation.Inject];for(var I in H){if(H[I] instanceof container.inner.Component){F[I]=this.get(H[I].name)}else{if(H[I] instanceof container.inner.Components){F[I]=this.gets(H[I].name)}else{if(H[I] instanceof container.inner.Provider){F[I]=H[I].func(F,this)}else{F[I]=H[I]}}}}}if(C[container.Annotation.Initialize]){var G=C[container.Annotation.Initialize];if(typeof G=="string"){F[G].apply(F,[this])}else{if(typeof G=="function"){G(F,this)}else{throw container.createError(new Error(),container.ErrorCode.IllegalDefinition,"illegal initialize method. string or function is supported.",{"def":A})}}}if(C[container.Annotation.Intercept]){var B=C[container.Annotation.Intercept];for(var E=0;E<B.length;E++){this.applyInterceptor(F,B[E][0],B[E][1])}}if(this.defs.interceptors&&A.componentType!="function"){for(var E=0;E<this.defs.interceptors.length;E++){var D=this.defs.interceptors[E];if(!D.nameMatcher){continue}if(D.nameMatcher instanceof container.Type&&D.nameMatcher.isImplementor(F)){this.applyInterceptor(F,D.interceptor,D.methodMatcher)}else{if(D.nameMatcher instanceof container.Matcher&&C[container.Annotation.Name]&&D.nameMatcher.match(C[container.Annotation.Name])){this.applyInterceptor(F,D.interceptor,D.methodMatcher)}}}}if(C[container.Annotation.Scope]==container.Scope.Prototype){A.instance=undefined}return F}catch(J){A.instance=undefined;throw J}finally{this.creating.pop()}},applyInterceptor:function(D,C,B){if(!C||!B){return }for(var A in D){if(typeof D[A]=="function"&&B.match(A)){(function(){var E=A;var F=D[E];D[E]=function(){var G=new container.MethodInvocation(E,F,D,arguments);return C(G)}})()}}},eachComponentDef:function(B){for(var A=0;A<this.defs.objects.length;A++){if(B){B.apply(null,[this.defs.objects[A]])}}},_createTypeCahce:function(C){var B=[];var A=this;this.eachComponentDef(function(D){if(A._isCreating(D)&&!D.instance){return }var E=A.create(D);if(C.isImplementor(E)){B.push(D)}});this.typeCache[C]=B},_isCreating:function(B){for(var A=0;A<this.creating.length;A++){if(B===this.creating[A]){return true}}return false}};container.Binder=function(A,B){this.defs=A;this.namespace=B};container.Binder.prototype={bind:function(A){return this._bind("object",A.prototype.meta,function(){return new A()})},bindMethod:function(C,B){var A=this;return this._bind("function",null,function(D){var E=D.get(C);if(!E){throw D.createError(new Error(),D.ErrorCode.ComponentNotFound,"component not found.",{"name":name})}return A._createBindMethod(E,B)})},bindMethods:function(C,B){var A=this;return this._bind("function",null,function(D){var G=D.gets(C);var F=[];for(var E=0;E<G.length;E++){F.push(A._createBindMethod(G[E],B))}return F})},bindProvider:function(A){return this._bind("object",null,A)},bindInstance:function(A){return this._bind("object",A.meta,function(){return A})},bindInterceptor:function(D,A,B){var C=this._getInterceptorDefs();C.push({"interceptor":D,"nameMatcher":A,"methodMatcher":B})},ns:function(B,A){if(this.namespace){B=this.namespace+"."+B}A(new container.Binder(this.defs,B))},_bind:function(A,E,B){var D=this._clone(E);D.constractor=B;D.componentType=A;var C=this._getObjectDefs();C.push(D);return new container.Builder(D,this.namespace)},_getObjectDefs:function(){if(!this.defs.objects){this.defs.objects=[]}return this.defs.objects},_getInterceptorDefs:function(){if(!this.defs.interceptors){this.defs.interceptors=[]}return this.defs.interceptors},_createBindMethod:function(B,A){return function(){return B[A].apply(B,arguments)}},_clone:function(F){var D={};if(F&&F[container.Annotation.Container]){F=F[container.Annotation.Container];for(var C in container.Annotation){var A=container.Annotation[C];if(A!=container.Annotation.Intercept&&A!=container.Annotation.Container){D[A]=F[A]}}D[container.Annotation.Intercept]=[];if(F[container.Annotation.Intercept]){var E=F[container.Annotation.Intercept];for(var C=0;C<E.length;C++){D[container.Annotation.Intercept].push(E[C])}}}var B={};B[container.Annotation.Container]=D;return B}};container.Builder=function(B,A){if(!B[container.Annotation.Container]){B[container.Annotation.Container]={}}this.def=B[container.Annotation.Container];if(!this.def[container.Annotation.Intercept]){this.def[container.Annotation.Intercept]=[]}this.namespace=A};container.Builder.prototype={to:function(A){if(this.namespace){A=this.namespace+"."+A}this.def[container.Annotation.Name]=A;return this},inject:function(A){this.def[container.Annotation.Inject]=A;return this},initialize:function(A){this.def[container.Annotation.Initialize]=A;return this},destroy:function(A){this.def[container.Annotation.Destroy]=A;return this},scope:function(A){this.def[container.Annotation.Scope]=A;return this},intercept:function(B,A){this.def[container.Annotation.Intercept].push([B,A]);return this}};container.Matcher=function(A,B){if(A&&!(A instanceof Array||A instanceof RegExp||A instanceof Function)){throw container.createError(new Error(),container.ErrorCode.IllegalArgument,"Illegal includes.",{})}if(B&&!(B instanceof Array||B instanceof RegExp||B instanceof Function)){throw container.createError(new Error(),container.ErrorCode.IllegalArgument,"Illegal excludes.",{})}this.excludes=B;this.includes=A};container.Matcher.prototype={match:function(A){if(this.excludes&&this.getEvaluator(this.excludes)(A)){return false}if(this.includes&&this.getEvaluator(this.includes)(A)){return true}return false},getEvaluator:function(A){if(A instanceof Array){return function(C){for(var B=0;B<A.length;B++){if(A[B] instanceof RegExp&&A[B].test(C)){return true}}return false}}else{if(A instanceof RegExp){return function(B){return A.test(B)}}else{if(A instanceof Function){return A}}}}};container.MethodInvocation=function(B,C,D,A){this.name=B;this.original=C;this.arg=A;this.target=D};container.MethodInvocation.prototype={getThis:function(){return this.target},proceed:function(){return this.original.apply(this.target,this.arg)},getArguments:function(){return this.arg},getOriginalMethod:function(){return this.original},getMethodName:function(){return this.name}};container.inner={};container.inner.Component=function(A){this.name=A};container.inner.Components=function(A){this.name=A};container.inner.Provider=function(A){this.func=A};container.createError=function(B,D,C,A){B.errorCode=D;B.message=C;B.options=A;B.name="container.Exception";return B};container.ErrorCode={IllegalArgument:1,ComponentNotFound:100,IllegalDefinition:101,CircularReference:102};container.Annotation={Container:"@Container",Name:"@Name",Inject:"@Inject",Initialize:"@Initialize",Destroy:"@Destroy",Intercept:"@Intercept",Scope:"@Scope",AutoInjection:"@AutoInjection"};container.Scope={Singleton:"Singleton",Prototype:"Prototype",EagerSingleton:"EagerSingleton"};container.any=function(){return new container.Matcher(/.*/)};container.component=function(A){return new container.inner.Component(A)};container.components=function(A){return new container.inner.Components(A)};container.provides=function(A){return new container.inner.Provider(A)};container.Inject=function(A){return container.component(A)};container.Injects=function(A){return container.components(A)};container.Type=function(){};container.Type.prototype={equals:function(A){},isImplementor:function(A){}};container.types={has:function(){return new container.inner.types.And(container.types._createTypes(arguments))},hasAny:function(){return new container.inner.types.Or(container.types._createTypes(arguments))},not:function(A){return new container.inner.types.Not(container.types._createType(A))},_createTypes:function(C){var B=[];for(var A=0;A<C.length;A++){B.push(container.types._createType(C[A]))}return B},_createType:function(A){if(A instanceof RegExp){return new container.inner.types.RegexpMethod(A)}else{if(A instanceof container.Type){return A}else{if(typeof A=="string"){return new container.inner.types.Method(A)}else{throw"illegal argument."}}}}};container.inner.types={};container.inner.types.Method=function(A){this.name=A};container.inner.types.Method.prototype=new container.Type();container.inner.types.Method.prototype.equals=function(A){if(!A||!(A instanceof container.inner.types.Method)){return false}return this.name==A.name};container.inner.types.Method.prototype.isImplementor=function(A){return typeof A[this.name]=="function"};container.inner.types.Method.prototype.toString=function(){return"!container.inner.types.Method:"+this.name};container.inner.types.RegexpMethod=function(A){this.exp=A};container.inner.types.RegexpMethod.prototype=new container.Type();container.inner.types.RegexpMethod.prototype.equals=function(A){if(!A||!(A instanceof container.inner.types.RegexpMethod)){return false}return this.exp.ignoreCase==A.exp.ignoreCase&&this.exp.global==A.exp.global&&this.exp.source==A.exp.source};container.inner.types.RegexpMethod.prototype.isImplementor=function(B){for(var A in B){if(typeof B[A]=="function"&&this.exp.test(A)){return true}}return false};container.inner.types.RegexpMethod.prototype.toString=function(){return"!container.inner.types.RegexpMethod:/"+this.exp.source+"/"+this.exp.ignoreCase+"/"+this.exp.global};container.inner.types.And=function(A){this.types=A};container.inner.types.And.prototype=new container.Type();container.inner.types.And.prototype.equals=function(D){if(!D||!(D instanceof container.inner.types.And)){return false}if(this.types.length!=D.types.length){return false}for(var C=0;C<this.types.length;C++){var B=this.types[C];var A=D.types[C];if(!B.equals(A)){return false}}return true};container.inner.types.And.prototype.isImplementor=function(B){for(var A=0;A<this.types.length;A++){if(!this.types[A].isImplementor(B)){return false}}return true};container.inner.types.And.prototype.toString=function(){var B="!container.inner.types.And:[";for(var A=0;A<this.types.length;A++){B+=this.types[A].toString()+","}B+="]";return B};container.inner.types.Or=function(A){this.types=A};container.inner.types.Or.prototype=new container.Type();container.inner.types.Or.prototype.equals=function(D){if(!D||!(D instanceof container.inner.types.Or)){return false}if(this.types.length!=D.types.length){return false}for(var C=0;C<this.types.length;C++){var B=this.types[C];var A=D.types[C];if(!B.equals(A)){return false}}return true};container.inner.types.Or.prototype.isImplementor=function(B){for(var A=0;A<this.types.length;A++){if(this.types[A].isImplementor(B)){return true}}return false};container.inner.types.Or.prototype.toString=function(){var B="!container.inner.types.Or:[";for(var A=0;A<this.types.length;A++){B+=this.types[A].toString()+","}B+="]";return B};container.inner.types.Not=function(A){this.type=A};container.inner.types.Not.prototype=new container.Type();container.inner.types.Not.prototype.equals=function(A){if(!A||!(A instanceof container.inner.types.Not)){return false}return this.type.equals(A.type)};container.inner.types.Not.prototype.isImplementor=function(A){return !this.type.isImplementor(A)};container.inner.types.Not.prototype.toString=function(){return"!container.inner.types.Not:["+this.type.toString()+"]"}