📄 wildcardhelper.html
字号:
<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="MATCH_FILE"><!-- --></A><H3>
MATCH_FILE</H3>
<PRE>
protected static final int <B>MATCH_FILE</B></PRE>
<DL>
<DD>The int representing '*' in the pattern <code>int []</code>.</DL>
<HR>
<A NAME="MATCH_PATH"><!-- --></A><H3>
MATCH_PATH</H3>
<PRE>
protected static final int <B>MATCH_PATH</B></PRE>
<DL>
<DD>The int representing '**' in the pattern <code>int []</code>.</DL>
<HR>
<A NAME="MATCH_BEGIN"><!-- --></A><H3>
MATCH_BEGIN</H3>
<PRE>
protected static final int <B>MATCH_BEGIN</B></PRE>
<DL>
<DD>The int representing begin in the pattern <code>int []</code>.</DL>
<HR>
<A NAME="MATCH_THEEND"><!-- --></A><H3>
MATCH_THEEND</H3>
<PRE>
protected static final int <B>MATCH_THEEND</B></PRE>
<DL>
<DD>The int representing end in pattern <code>int []</code>.</DL>
<HR>
<A NAME="MATCH_END"><!-- --></A><H3>
MATCH_END</H3>
<PRE>
protected static final int <B>MATCH_END</B></PRE>
<DL>
<DD>The int value that terminates the pattern <code>int []</code>.</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="WildcardHelper()"><!-- --></A><H3>
WildcardHelper</H3>
<PRE>
public <B>WildcardHelper</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="compilePattern(java.lang.String)"><!-- --></A><H3>
compilePattern</H3>
<PRE>
public int[] <B>compilePattern</B>(java.lang.String data)</PRE>
<DL>
<DD>Translate the given <code>String</code> into a <code>int []</code> representing the pattern matchable by this class. <br> This function translates a <code>String</code> into an int array converting the special '*' and '\' characters. <br> Here is how the conversion algorithm works: <ul> <li>The '*' character is converted to MATCH_FILE, meaning that zero or more characters (excluding the path separator '/') are to be matched.</li> <li>The '**' sequence is converted to MATCH_PATH, meaning that zero or more characters (including the path separator '/') are to be matched.</li> <li>The '\' character is used as an escape sequence ('\*' is translated in '*', not in MATCH_FILE). If an exact '\' character is to be matched the source string must contain a '\\'. sequence.</li> </ul> When more than two '*' characters, not separated by another character, are found their value is considered as '**' (MATCH_PATH). <br> The array is always terminated by a special value (MATCH_END). <br> All MATCH* values are less than zero, while normal characters are equal or greater.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>data</CODE> - The string to translate.<DT><B>Returns:</B><DD>The encoded string as an int array, terminated by the MATCH_END value (don't consider the array length).<DT><B>Throws:</B><DD><CODE>NullPointerException</CODE> - If data is null.</DL>
</DD>
</DL>
<HR>
<A NAME="match(java.util.Map, java.lang.String, int[])"><!-- --></A><H3>
match</H3>
<PRE>
public boolean <B>match</B>(java.util.Map map, java.lang.String data, int[] expr)</PRE>
<DL>
<DD>Match a pattern agains a string and isolates wildcard replacement into a <code>Stack</code>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>map</CODE> - The map to store matched values<DD><CODE>data</CODE> - The string to match<DD><CODE>expr</CODE> - The compiled wildcard expression<DT><B>Returns:</B><DD>True if a match<DT><B>Throws:</B><DD><CODE>NullPointerException</CODE> - If any parameters are null</DL>
</DD>
</DL>
<HR>
<A NAME="indexOfArray(int[], int, int, char[], int)"><!-- --></A><H3>
indexOfArray</H3>
<PRE>
protected int <B>indexOfArray</B>(int[] r, int rpos, int rend, char[] d, int dpos)</PRE>
<DL>
<DD>Get the offset of a part of an int array within a char array. <br> This method return the index in d of the first occurrence after dpos of that part of array specified by r, starting at rpos and terminating at rend.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - The array containing the data that need to be matched in d.<DD><CODE>rpos</CODE> - The index of the first character in r to look for.<DD><CODE>rend</CODE> - The index of the last character in r to look for plus 1.<DD><CODE>d</CODE> - The array of char that should contain a part of r.<DD><CODE>dpos</CODE> - The starting offset in d for the matching.<DT><B>Returns:</B><DD>The offset in d of the part of r matched in d or -1 if that was not found.</DL>
</DD>
</DL>
<HR>
<A NAME="lastIndexOfArray(int[], int, int, char[], int)"><!-- --></A><H3>
lastIndexOfArray</H3>
<PRE>
protected int <B>lastIndexOfArray</B>(int[] r, int rpos, int rend, char[] d, int dpos)</PRE>
<DL>
<DD>Get the offset of a last occurance of an int array within a char array. <br> This method return the index in d of the last occurrence after dpos of that part of array specified by r, starting at rpos and terminating at rend.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - The array containing the data that need to be matched in d.<DD><CODE>rpos</CODE> - The index of the first character in r to look for.<DD><CODE>rend</CODE> - The index of the last character in r to look for plus 1.<DD><CODE>d</CODE> - The array of char that should contain a part of r.<DD><CODE>dpos</CODE> - The starting offset in d for the matching.<DT><B>Returns:</B><DD>The offset in d of the last part of r matched in d or -1 if that was not found.</DL>
</DD>
</DL>
<HR>
<A NAME="matchArray(int[], int, int, char[], int)"><!-- --></A><H3>
matchArray</H3>
<PRE>
protected boolean <B>matchArray</B>(int[] r, int rpos, int rend, char[] d, int dpos)</PRE>
<DL>
<DD>Matches elements of array r from rpos to rend with array d, starting from dpos. <br> This method return true if elements of array r from rpos to rend equals elements of array d starting from dpos to dpos+(rend-rpos).<DD><DL>
<DT><B>Parameters:</B><DD><CODE>r</CODE> - The array containing the data that need to be matched in d.<DD><CODE>rpos</CODE> - The index of the first character in r to look for.<DD><CODE>rend</CODE> - The index of the last character in r to look for.<DD><CODE>d</CODE> - The array of char that should start from a part of r.<DD><CODE>dpos</CODE> - The starting offset in d for the matching.<DT><B>Returns:</B><DD>true if array d starts from portion of array r.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/WildcardHelper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../org/apache/struts/util/TokenProcessor.html"><B>PREV CLASS</B></A>
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="WildcardHelper.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -