X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=site%2Fj2s%2Fcom%2Fstevesoft%2Fpat%2FStart.js;fp=site%2Fj2s%2Fcom%2Fstevesoft%2Fpat%2FStart.js;h=1ef02d72fedc278bedcd9839c0b55fa8104fea69;hb=4231d40261fef32ce4570a6bbad0d35df44e8baf;hp=0000000000000000000000000000000000000000;hpb=c07eb2c5794833bd0241000d6844d783fe10cb82;p=jalview.git diff --git a/site/j2s/com/stevesoft/pat/Start.js b/site/j2s/com/stevesoft/pat/Start.js new file mode 100644 index 0000000..1ef02d7 --- /dev/null +++ b/site/j2s/com/stevesoft/pat/Start.js @@ -0,0 +1,35 @@ +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Start", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.retIsStart = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "Start", com.stevesoft.pat.Pattern); +Clazz.makeConstructor (c$, +function (b) { +Clazz.superConstructor (this, com.stevesoft.pat.Start, []); +this.retIsStart = b; +}, "~B"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +if (this.retIsStart && pt.mFlag && pos > 0 && pt.src.charAt (pos - 1) == '\n') { +return this.nextMatch (pos, pt); +}if (pos == 0) { +return this.nextMatch (pos, pt); +}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "toString", +function () { +if (this.retIsStart) { +return "^" + this.nextString (); +} else { +return "\\A" + this.nextString (); +}}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.Start (this.retIsStart); +}, "java.util.Hashtable"); +});