JAL-1807 Bob's JalviewJS prototype first commit
[jalviewjs.git] / site / j2s / com / stevesoft / pat / StringRule.js
1 Clazz.declarePackage ("com.stevesoft.pat");\r
2 Clazz.load (["com.stevesoft.pat.ReplaceRule"], "com.stevesoft.pat.StringRule", null, function () {\r
3 c$ = Clazz.decorateAsClass (function () {\r
4 this.s = null;\r
5 Clazz.instantialize (this, arguments);\r
6 }, com.stevesoft.pat, "StringRule", com.stevesoft.pat.ReplaceRule);\r
7 Clazz.makeConstructor (c$, \r
8 function (s) {\r
9 Clazz.superConstructor (this, com.stevesoft.pat.StringRule, []);\r
10 this.s = s;\r
11 }, "~S");\r
12 Clazz.overrideMethod (c$, "apply", \r
13 function (sb, res) {\r
14 sb.append (this.s);\r
15 }, "com.stevesoft.pat.StringBufferLike,com.stevesoft.pat.RegRes");\r
16 Clazz.overrideMethod (c$, "toString1", \r
17 function () {\r
18 return this.s;\r
19 });\r
20 Clazz.overrideMethod (c$, "clone1", \r
21 function () {\r
22 return  new com.stevesoft.pat.StringRule (this.s);\r
23 });\r
24 });\r