PageRenderTime 52ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/www/tags/NOV_07_2009/htdocs/api/org/gjt/sp/jedit/search/SearchMatcher.html

#
HTML | 342 lines | 286 code | 42 blank | 14 comment | 0 complexity | 395fd1d420739d7e79e4a8c2abc02b43 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.5.0_14) on Tue Jul 22 07:14:13 GMT-08:00 2008 -->
  6. <TITLE>
  7. SearchMatcher (jEdit API)
  8. </TITLE>
  9. <META NAME="keywords" CONTENT="org.gjt.sp.jedit.search.SearchMatcher class">
  10. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
  11. <NOSCRIPT>
  12. </NOSCRIPT>
  13. </HEAD>
  14. <BODY BGCOLOR="white" >
  15. <!-- ========= START OF TOP NAVBAR ======= -->
  16. <A NAME="navbar_top"><!-- --></A>
  17. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  18. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  19. <TR>
  20. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  21. <A NAME="navbar_top_firstrow"><!-- --></A>
  22. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  23. <TR ALIGN="center" VALIGN="top">
  24. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  25. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  26. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  27. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SearchMatcher.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  28. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  29. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  30. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  31. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  32. </TR>
  33. </TABLE>
  34. </TD>
  35. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  36. </EM>
  37. </TD>
  38. </TR>
  39. <TR>
  40. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  41. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/search/SearchFileSet.html" title="interface in org.gjt.sp.jedit.search"><B>PREV CLASS</B></A>&nbsp;
  42. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.Match.html" title="class in org.gjt.sp.jedit.search"><B>NEXT CLASS</B></A></FONT></TD>
  43. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  44. <A HREF="../../../../../index.html?org/gjt/sp/jedit/search/SearchMatcher.html" target="_top"><B>FRAMES</B></A> &nbsp;
  45. &nbsp;<A HREF="SearchMatcher.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  46. &nbsp;
  47. <NOSCRIPT>
  48. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  49. </NOSCRIPT>
  50. </FONT></TD>
  51. </TR>
  52. <TR>
  53. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  54. SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  55. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  56. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  57. </TR>
  58. </TABLE>
  59. <A NAME="skip-navbar_top"></A>
  60. <!-- ========= END OF TOP NAVBAR ========= -->
  61. <HR>
  62. <!-- ======== START OF CLASS DATA ======== -->
  63. <H2>
  64. <FONT SIZE="-1">
  65. org.gjt.sp.jedit.search</FONT>
  66. <BR>
  67. Class SearchMatcher</H2>
  68. <PRE>
  69. java.lang.Object
  70. <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.gjt.sp.jedit.search.SearchMatcher</B>
  71. </PRE>
  72. <DL>
  73. <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/gjt/sp/jedit/search/BoyerMooreSearchMatcher.html" title="class in org.gjt.sp.jedit.search">BoyerMooreSearchMatcher</A>, <A HREF="../../../../../org/gjt/sp/jedit/search/PatternSearchMatcher.html" title="class in org.gjt.sp.jedit.search">PatternSearchMatcher</A></DD>
  74. </DL>
  75. <HR>
  76. <DL>
  77. <DT><PRE>public abstract class <B>SearchMatcher</B><DT>extends java.lang.Object</DL>
  78. </PRE>
  79. <P>
  80. An abstract class for matching strings.
  81. <P>
  82. <P>
  83. <HR>
  84. <P>
  85. <!-- ======== NESTED CLASS SUMMARY ======== -->
  86. <A NAME="nested_class_summary"><!-- --></A>
  87. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  88. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  89. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  90. <B>Nested Class Summary</B></FONT></TH>
  91. </TR>
  92. <TR BGCOLOR="white" CLASS="TableRowColor">
  93. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  94. <CODE>static&nbsp;class</CODE></FONT></TD>
  95. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.Match.html" title="class in org.gjt.sp.jedit.search">SearchMatcher.Match</A></B></CODE>
  96. <BR>
  97. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  98. </TR>
  99. </TABLE>
  100. &nbsp;<!-- =========== FIELD SUMMARY =========== -->
  101. <A NAME="field_summary"><!-- --></A>
  102. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  103. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  104. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  105. <B>Field Summary</B></FONT></TH>
  106. </TR>
  107. <TR BGCOLOR="white" CLASS="TableRowColor">
  108. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  109. <CODE>protected &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.Match.html" title="class in org.gjt.sp.jedit.search">SearchMatcher.Match</A></CODE></FONT></TD>
  110. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.html#returnValue">returnValue</A></B></CODE>
  111. <BR>
  112. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  113. </TR>
  114. </TABLE>
  115. &nbsp;
  116. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  117. <A NAME="constructor_summary"><!-- --></A>
  118. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  119. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  120. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  121. <B>Constructor Summary</B></FONT></TH>
  122. </TR>
  123. <TR BGCOLOR="white" CLASS="TableRowColor">
  124. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.html#SearchMatcher()">SearchMatcher</A></B>()</CODE>
  125. <BR>
  126. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
  127. </TR>
  128. </TABLE>
  129. &nbsp;
  130. <!-- ========== METHOD SUMMARY =========== -->
  131. <A NAME="method_summary"><!-- --></A>
  132. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  133. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  134. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  135. <B>Method Summary</B></FONT></TH>
  136. </TR>
  137. <TR BGCOLOR="white" CLASS="TableRowColor">
  138. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  139. <CODE>&nbsp;boolean</CODE></FONT></TD>
  140. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.html#isMatchingEOL()">isMatchingEOL</A></B>()</CODE>
  141. <BR>
  142. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the matcher is matching the end of the line
  143. character.</TD>
  144. </TR>
  145. <TR BGCOLOR="white" CLASS="TableRowColor">
  146. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  147. <CODE>abstract &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.Match.html" title="class in org.gjt.sp.jedit.search">SearchMatcher.Match</A></CODE></FONT></TD>
  148. <TD><CODE><B><A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.html#nextMatch(java.lang.CharSequence, boolean, boolean, boolean, boolean)">nextMatch</A></B>(java.lang.CharSequence&nbsp;text,
  149. boolean&nbsp;start,
  150. boolean&nbsp;end,
  151. boolean&nbsp;firstTime,
  152. boolean&nbsp;reverse)</CODE>
  153. <BR>
  154. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the offset of the first match of the specified text
  155. within this matcher.</TD>
  156. </TR>
  157. </TABLE>
  158. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  159. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  160. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  161. <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
  162. </TR>
  163. <TR BGCOLOR="white" CLASS="TableRowColor">
  164. <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
  165. </TR>
  166. </TABLE>
  167. &nbsp;
  168. <P>
  169. <!-- ============ FIELD DETAIL =========== -->
  170. <A NAME="field_detail"><!-- --></A>
  171. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  172. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  173. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  174. <B>Field Detail</B></FONT></TH>
  175. </TR>
  176. </TABLE>
  177. <A NAME="returnValue"><!-- --></A><H3>
  178. returnValue</H3>
  179. <PRE>
  180. protected <A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.Match.html" title="class in org.gjt.sp.jedit.search">SearchMatcher.Match</A> <B>returnValue</B></PRE>
  181. <DL>
  182. <DL>
  183. </DL>
  184. </DL>
  185. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  186. <A NAME="constructor_detail"><!-- --></A>
  187. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  188. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  189. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  190. <B>Constructor Detail</B></FONT></TH>
  191. </TR>
  192. </TABLE>
  193. <A NAME="SearchMatcher()"><!-- --></A><H3>
  194. SearchMatcher</H3>
  195. <PRE>
  196. public <B>SearchMatcher</B>()</PRE>
  197. <DL>
  198. </DL>
  199. <!-- ============ METHOD DETAIL ========== -->
  200. <A NAME="method_detail"><!-- --></A>
  201. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  202. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  203. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  204. <B>Method Detail</B></FONT></TH>
  205. </TR>
  206. </TABLE>
  207. <A NAME="nextMatch(java.lang.CharSequence, boolean, boolean, boolean, boolean)"><!-- --></A><H3>
  208. nextMatch</H3>
  209. <PRE>
  210. public abstract <A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.Match.html" title="class in org.gjt.sp.jedit.search">SearchMatcher.Match</A> <B>nextMatch</B>(java.lang.CharSequence&nbsp;text,
  211. boolean&nbsp;start,
  212. boolean&nbsp;end,
  213. boolean&nbsp;firstTime,
  214. boolean&nbsp;reverse)</PRE>
  215. <DL>
  216. <DD>Returns the offset of the first match of the specified text
  217. within this matcher.
  218. <P>
  219. <DD><DL>
  220. <DT><B>Parameters:</B><DD><CODE>text</CODE> - The text to search in<DD><CODE>start</CODE> - True if the start of the segment is the beginning of the
  221. buffer<DD><CODE>end</CODE> - True if the end of the segment is the end of the buffer<DD><CODE>firstTime</CODE> - If false and the search string matched at the start
  222. offset with length zero, automatically find next match<DD><CODE>reverse</CODE> - If true, searching will be performed in a backward
  223. direction.
  224. <DT><B>Returns:</B><DD>an array where the first element is the start offset
  225. of the match, and the second element is the end offset of
  226. the match<DT><B>Since:</B></DT>
  227. <DD>jEdit 4.3pre5</DD>
  228. </DL>
  229. </DD>
  230. </DL>
  231. <HR>
  232. <A NAME="isMatchingEOL()"><!-- --></A><H3>
  233. isMatchingEOL</H3>
  234. <PRE>
  235. public boolean <B>isMatchingEOL</B>()</PRE>
  236. <DL>
  237. <DD>Returns whether the matcher is matching the end of the line
  238. character. This should be used to adjust the matched region
  239. size when matching the end-of-line character, since it's not
  240. included in the matched region returned by the
  241. java.util.regex.Pattern matcher.
  242. <P>
  243. <DD><DL>
  244. <DT><B>Returns:</B><DD>Whether the end of the match region will be the EOL
  245. character.<DT><B>Since:</B></DT>
  246. <DD>jEdit 4.3pre7</DD>
  247. </DL>
  248. </DD>
  249. </DL>
  250. <!-- ========= END OF CLASS DATA ========= -->
  251. <HR>
  252. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  253. <A NAME="navbar_bottom"><!-- --></A>
  254. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  255. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  256. <TR>
  257. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  258. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  259. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  260. <TR ALIGN="center" VALIGN="top">
  261. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  262. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  263. <TD BGCOLOR="#00008B" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  264. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SearchMatcher.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  265. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  266. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  267. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  268. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  269. </TR>
  270. </TABLE>
  271. </TD>
  272. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  273. </EM>
  274. </TD>
  275. </TR>
  276. <TR>
  277. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  278. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/search/SearchFileSet.html" title="interface in org.gjt.sp.jedit.search"><B>PREV CLASS</B></A>&nbsp;
  279. &nbsp;<A HREF="../../../../../org/gjt/sp/jedit/search/SearchMatcher.Match.html" title="class in org.gjt.sp.jedit.search"><B>NEXT CLASS</B></A></FONT></TD>
  280. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  281. <A HREF="../../../../../index.html?org/gjt/sp/jedit/search/SearchMatcher.html" target="_top"><B>FRAMES</B></A> &nbsp;
  282. &nbsp;<A HREF="SearchMatcher.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  283. &nbsp;
  284. <NOSCRIPT>
  285. <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
  286. </NOSCRIPT>
  287. </FONT></TD>
  288. </TR>
  289. <TR>
  290. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  291. SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  292. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  293. DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  294. </TR>
  295. </TABLE>
  296. <A NAME="skip-navbar_bottom"></A>
  297. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  298. <HR>
  299. </BODY>
  300. </HTML>