1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Mar 15 14:18:43 EST 2001 -->
<TITLE>
Xalan-Java 2: Class Function
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_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 ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="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/Function.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT ID="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/xpath/functions/FuncSystemProperty.html"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/xpath/functions/Function2Args.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="Function.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.xpath.functions</FONT>
<BR>
Class Function</H2>
<PRE>
java.lang.Object
|
+--<A HREF="../../../../org/apache/xpath/Expression.html">org.apache.xpath.Expression</A>
|
+--<B>org.apache.xpath.functions.Function</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/xpath/functions/FuncCurrent.html">FuncCurrent</A>, <A HREF="../../../../org/apache/xpath/functions/FuncExtFunction.html">FuncExtFunction</A>, <A HREF="../../../../org/apache/xpath/functions/FuncFalse.html">FuncFalse</A>, <A HREF="../../../../org/apache/xpath/functions/FuncLast.html">FuncLast</A>, <A HREF="../../../../org/apache/xpath/functions/FuncPosition.html">FuncPosition</A>, <A HREF="../../../../org/apache/xpath/functions/FunctionOneArg.html">FunctionOneArg</A>, <A HREF="../../../../org/apache/xpath/functions/FuncTrue.html">FuncTrue</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>Function</B><DT>extends <A HREF="../../../../org/apache/xpath/Expression.html">Expression</A></DL>
<P>
<i><font size="-1" color="#00FF00">**For advanced use only** </font></i><meta name="usage" content="advanced"/>
This is a superclass of all XPath functions. This allows two
ways for the class to be called. One method is that the
super class processes the arguments and hands the results to
the derived class, the other method is that the derived
class may process it's own arguments, which is faster since
the arguments don't have to be added to an array, but causes
a larger code footprint.
<P>
<DL>
<DT><B>See Also: </B><DD><A HREF="../../../../serialized-form.html#org.apache.xpath.functions.Function">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/xpath/functions/Function.html#Function()">Function</A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xpath/functions/Function.html#checkNumberArgs(int)">checkNumberArgs</A></B>(int argNum)</CODE>
<BR>
Check that the number of arguments passed to this function is correct.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/apache/xpath/objects/XObject.html">XObject</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xpath/functions/Function.html#execute(org.apache.xpath.XPathContext)">execute</A></B>(<A HREF="../../../../org/apache/xpath/XPathContext.html">XPathContext</A> xctxt)</CODE>
<BR>
Execute an XPath function object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xpath/functions/Function.html#setArg(org.apache.xpath.Expression, int)">setArg</A></B>(<A HREF="../../../../org/apache/xpath/Expression.html">Expression</A> arg,
int argNum)</CODE>
<BR>
Set an argument expression for a function.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_org.apache.xpath.Expression"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class org.apache.xpath.<A HREF="../../../../org/apache/xpath/Expression.html">Expression</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/xpath/Expression.html#assert(boolean, java.lang.String)">assert</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#canTraverseOutsideSubtree()">canTraverseOutsideSubtree</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#error(org.apache.xpath.XPathContext, int, java.lang.Object[])">error</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#setSourceLocator(javax.xml.transform.SourceLocator)">setSourceLocator</A>,
<A HREF="../../../../org/apache/xpath/Expression.html#warn(org.apache.xpath.XPathContext, int, java.lang.Object[])">warn</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= 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="Function()"><!-- --></A><H3>
Function</H3>
<PRE>
public <B>Function</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="setArg(org.apache.xpath.Expression, int)"><!-- --></A><H3>
setArg</H3>
<PRE>
public void <B>setArg</B>(<A HREF="../../../../org/apache/xpath/Expression.html">Expression</A> arg,
int argNum)
throws <A HREF="../../../../org/apache/xpath/functions/WrongNumberArgsException.html">WrongNumberArgsException</A></PRE>
<DL>
<DD>Set an argument expression for a function. This method is called by the
XPath compiler.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>arg</CODE> - non-null expression that represents the argument.<DD><CODE>argNum</CODE> - The argument number index.<DT><B>Throws:</B><DD><A HREF="../../../../org/apache/xpath/functions/WrongNumberArgsException.html">WrongNumberArgsException</A> - If the argNum parameter is beyond what
is specified for this function.</DL>
</DD>
</DL>
<HR>
<A NAME="checkNumberArgs(int)"><!-- --></A><H3>
checkNumberArgs</H3>
<PRE>
public void <B>checkNumberArgs</B>(int argNum)
throws <A HREF="../../../../org/apache/xpath/functions/WrongNumberArgsException.html">WrongNumberArgsException</A></PRE>
<DL>
<DD>Check that the number of arguments passed to this function is correct.
This method is meant to be overloaded by derived classes, to check for
the number of arguments for a specific function type. This method is
called by the compiler for static number of arguments checking.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>argNum</CODE> - The number of arguments that is being passed to the function.<DT><B>Throws:</B><DD><A HREF="../../../../org/apache/xpath/functions/WrongNumberArgsException.html">WrongNumberArgsException</A> - </DL>
</DD>
</DL>
<HR>
<A NAME="execute(org.apache.xpath.XPathContext)"><!-- --></A><H3>
execute</H3>
<PRE>
public <A HREF="../../../../org/apache/xpath/objects/XObject.html">XObject</A> <B>execute</B>(<A HREF="../../../../org/apache/xpath/XPathContext.html">XPathContext</A> xctxt)
throws <A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A></PRE>
<DL>
<DD>Execute an XPath function object. The function must return
a valid object.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>xctxt</CODE> - The execution current context.<DT><B>Returns:</B><DD>A valid XObject.<DT><B>Throws:</B><DD><A HREF="../../../../javax/xml/transform/TransformerException.html">TransformerException</A> - <DT><B>Overrides:</B><DD><A HREF="../../../../org/apache/xpath/Expression.html#execute(org.apache.xpath.XPathContext)">execute</A> in class <A HREF="../../../../org/apache/xpath/Expression.html">Expression</A></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 ID="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="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/Function.html"><FONT ID="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT ID="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/xpath/functions/FuncSystemProperty.html"><B>PREV CLASS</B></A>
<A HREF="../../../../org/apache/xpath/functions/Function2Args.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="Function.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright 2000 Apache XML Project. All Rights Reserved.
</BODY>
</HTML>
|