You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@locus.apache.org on 2000/12/16 21:01:59 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/functions FuncConcat.java FuncExtFunction.java FuncFormatNumber.java FuncId.java FuncNormalizeSpace.java FuncPosition.java FuncRound.java FuncSubstring.java FuncSystemProperty.java Function.java Function2Args.java Function3Args.java FunctionDef1Arg.java FunctionMultiArgs.java FunctionOneArg.java WrongNumberArgsException.java
sboag 00/12/16 12:01:59
Modified: java/src/org/apache/xpath/compiler Compiler.java
java/src/org/apache/xpath/functions FuncConcat.java
FuncExtFunction.java FuncFormatNumber.java
FuncId.java FuncNormalizeSpace.java
FuncPosition.java FuncRound.java FuncSubstring.java
FuncSystemProperty.java Function.java
Function2Args.java Function3Args.java
FunctionDef1Arg.java FunctionMultiArgs.java
FunctionOneArg.java WrongNumberArgsException.java
Log:
Remaining javadoc work for org.apache.xpath.functions.
Revision Changes Path
1.16 +1 -1 xml-xalan/java/src/org/apache/xpath/compiler/Compiler.java
Index: Compiler.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/Compiler.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Compiler.java 2000/11/23 04:59:04 1.15
+++ Compiler.java 2000/12/16 20:01:52 1.16
@@ -1022,7 +1022,7 @@
{
java.lang.String name = FunctionTable.m_functions[funcID].getName();
- throw new TransformerException(name + " only allows " + wnae.m_argsExpected
+ throw new TransformerException(name + " only allows " + wnae.getMessage()
+ " arguments");
}
1.4 +2 -2 xml-xalan/java/src/org/apache/xpath/functions/FuncConcat.java
Index: FuncConcat.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncConcat.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncConcat.java 2000/11/13 16:27:33 1.3
+++ FuncConcat.java 2000/12/16 20:01:53 1.4
@@ -104,10 +104,10 @@
}
/**
- * NEEDSDOC Method checkNumberArgs
+ * Check that the number of arguments passed to this function is correct.
*
*
- * NEEDSDOC @param argNum
+ * @param argNum The number of arguments that is being passed to the function.
*
* @throws WrongNumberArgsException
*/
1.6 +27 -18 xml-xalan/java/src/org/apache/xpath/functions/FuncExtFunction.java
Index: FuncExtFunction.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncExtFunction.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FuncExtFunction.java 2000/11/13 16:27:33 1.5
+++ FuncExtFunction.java 2000/12/16 20:01:53 1.6
@@ -68,31 +68,39 @@
import org.w3c.dom.traversal.NodeIterator;
/**
- * <meta name="usage" content="internal"/>
- * NEEDSDOC Class FuncExtFunction <needs-comment/>
+ * <meta name="usage" content="advanced"/>
+ * An object of this class represents an extension call expression. When
+ * the expression executes, it calls ExtensionsTable#extFunction, and then
+ * converts the result to the appropriate XObject.
*/
public class FuncExtFunction extends Function
{
- /** NEEDSDOC Field m_namespace */
+ /** The namespace for the extension function, which should not normally
+ * be null or empty. */
String m_namespace;
- /** NEEDSDOC Field m_extensionName */
+ /** The local name of the extension. */
String m_extensionName;
- /** NEEDSDOC Field m_methodKey */
+ /** Unique method key, which is passed to ExtensionsTable#extFunction in
+ * order to allow caching of the method. */
Object m_methodKey;
- /** NEEDSDOC Field m_argVec */
+ /** Array of static expressions which represent the parameters to the
+ * function. */
Vector m_argVec = new Vector();
/**
- * Constructor FuncExtFunction
+ * Create a new FuncExtFunction based on the qualified name of the extension,
+ * and a unique method key.
*
- *
- * NEEDSDOC @param namespace
- * NEEDSDOC @param extensionName
- * NEEDSDOC @param methodKey
+ * @param namespace The namespace for the extension function, which should
+ * not normally be null or empty.
+ * @param extensionName The local name of the extension.
+ * @param methodKey Unique method key, which is passed to
+ * ExtensionsTable#extFunction in order to allow caching
+ * of the method.
*/
public FuncExtFunction(java.lang.String namespace,
java.lang.String extensionName, Object methodKey)
@@ -182,13 +190,14 @@
}
/**
- * NEEDSDOC Method setArg
- *
+ * Set an argument expression for a function. This method is called by the
+ * XPath compiler.
*
- * NEEDSDOC @param arg
- * NEEDSDOC @param argNum
+ * @param arg non-null expression that represents the argument.
+ * @param argNum The argument number index.
*
- * @throws WrongNumberArgsException
+ * @throws WrongNumberArgsException If the argNum parameter is beyond what
+ * is specified for this function.
*/
public void setArg(Expression arg, int argNum)
throws WrongNumberArgsException
@@ -197,10 +206,10 @@
}
/**
- * NEEDSDOC Method checkNumberArgs
+ * Check that the number of arguments passed to this function is correct.
*
*
- * NEEDSDOC @param argNum
+ * @param argNum The number of arguments that is being passed to the function.
*
* @throws WrongNumberArgsException
*/
1.4 +2 -2 xml-xalan/java/src/org/apache/xpath/functions/FuncFormatNumber.java
Index: FuncFormatNumber.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncFormatNumber.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncFormatNumber.java 2000/11/13 16:27:33 1.3
+++ FuncFormatNumber.java 2000/12/16 20:01:53 1.4
@@ -102,10 +102,10 @@
}
/**
- * NEEDSDOC Method checkNumberArgs
+ * Check that the number of arguments passed to this function is correct.
*
*
- * NEEDSDOC @param argNum
+ * @param argNum The number of arguments that is being passed to the function.
*
* @throws WrongNumberArgsException
*/
1.6 +9 -9 xml-xalan/java/src/org/apache/xpath/functions/FuncId.java
Index: FuncId.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncId.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FuncId.java 2000/11/23 04:59:11 1.5
+++ FuncId.java 2000/12/16 20:01:53 1.6
@@ -83,17 +83,17 @@
{
/**
- * NEEDSDOC Method getNodesByID
+ * Fill in a list with nodes that match a space delimited list if ID
+ * ID references.
*
+ * @param xctxt The runtime XPath context.
+ * @param docContext The document where the nodes are being looked for.
+ * @param refval A space delimited list of ID references.
+ * @param usedrefs List of references for which nodes were found.
+ * @param nodeSet Node set where the nodes will be added to.
+ * @param mayBeMore true if there is another set of nodes to be looked for.
*
- * NEEDSDOC @param xctxt
- * NEEDSDOC @param docContext
- * NEEDSDOC @param refval
- * NEEDSDOC @param usedrefs
- * NEEDSDOC @param nodeSet
- * NEEDSDOC @param mayBeMore
- *
- * NEEDSDOC (getNodesByID) @return
+ * @return The usedrefs value.
*/
private StringVector getNodesByID(XPathContext xctxt, Document docContext,
String refval, StringVector usedrefs,
1.6 +2 -2 xml-xalan/java/src/org/apache/xpath/functions/FuncNormalizeSpace.java
Index: FuncNormalizeSpace.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncNormalizeSpace.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FuncNormalizeSpace.java 2000/11/23 04:59:12 1.5
+++ FuncNormalizeSpace.java 2000/12/16 20:01:54 1.6
@@ -70,8 +70,8 @@
import org.apache.xml.utils.XMLCharacterRecognizer;
/**
- * <meta name="usage" content="internal"/>
- * NEEDSDOC Class FuncNormalizeSpace <needs-comment/>
+ * <meta name="usage" content="advanced"/>
+ * Execute the normalize-space() function.
*/
public class FuncNormalizeSpace extends FunctionDef1Arg
{
1.4 +3 -2 xml-xalan/java/src/org/apache/xpath/functions/FuncPosition.java
Index: FuncPosition.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncPosition.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncPosition.java 2000/11/13 16:27:35 1.3
+++ FuncPosition.java 2000/12/16 20:01:54 1.4
@@ -79,9 +79,10 @@
/**
* Get the position in the current context node list.
*
- * NEEDSDOC @param xctxt
+ * @param xctxt Runtime XPath context.
*
- * NEEDSDOC ($objectName$) @return
+ * @return The current position of the itteration in the context node list,
+ * or -1 if there is no active context node list.
*/
public int getPositionInContextNodeList(XPathContext xctxt)
{
1.4 +1 -1 xml-xalan/java/src/org/apache/xpath/functions/FuncRound.java
Index: FuncRound.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncRound.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncRound.java 2000/11/13 16:27:35 1.3
+++ FuncRound.java 2000/12/16 20:01:54 1.4
@@ -67,7 +67,7 @@
/**
* <meta name="usage" content="advanced"/>
- * Execute the Round() function.
+ * Execute the round() function.
*/
public class FuncRound extends FunctionOneArg
{
1.4 +2 -2 xml-xalan/java/src/org/apache/xpath/functions/FuncSubstring.java
Index: FuncSubstring.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncSubstring.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FuncSubstring.java 2000/11/13 16:27:35 1.3
+++ FuncSubstring.java 2000/12/16 20:01:54 1.4
@@ -131,10 +131,10 @@
}
/**
- * NEEDSDOC Method checkNumberArgs
+ * Check that the number of arguments passed to this function is correct.
*
*
- * NEEDSDOC @param argNum
+ * @param argNum The number of arguments that is being passed to the function.
*
* @throws WrongNumberArgsException
*/
1.7 +7 -12 xml-xalan/java/src/org/apache/xpath/functions/FuncSystemProperty.java
Index: FuncSystemProperty.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncSystemProperty.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- FuncSystemProperty.java 2000/11/23 04:59:12 1.6
+++ FuncSystemProperty.java 2000/12/16 20:01:54 1.7
@@ -83,10 +83,11 @@
public class FuncSystemProperty extends FunctionOneArg
{
- /** NEEDSDOC Field xsltInfo */
+ /** List of properties where the name of the property argument is
+ * to be looked for. */
Properties xsltInfo = new Properties();
- /** NEEDSDOC Field XSLT_PROPERTIES */
+ /** The name of the property file where the name will be stored. */
static String XSLT_PROPERTIES = "/org/apache/xalan/res/XSLTInfo.properties";
/**
@@ -194,18 +195,12 @@
return new XString(result);
}
- /*
+ /**
* Retrieve a propery bundle from a specified file
- * @param file The string name of the property file. The file is loaded from the workplace base directory
+ *
+ * @param file The string name of the property file. The file is loaded from
+ * the workplace base directory
* @param target The target property bag the file will be placed into.
- */
-
- /**
- * NEEDSDOC Method loadPropertyFile
- *
- *
- * NEEDSDOC @param file
- * NEEDSDOC @param target
*/
public void loadPropertyFile(String file, Properties target)
{
1.4 +11 -8 xml-xalan/java/src/org/apache/xpath/functions/Function.java
Index: Function.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/Function.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Function.java 2000/11/13 16:27:35 1.3
+++ Function.java 2000/12/16 20:01:54 1.4
@@ -79,13 +79,14 @@
{
/**
- * NEEDSDOC Method setArg
+ * Set an argument expression for a function. This method is called by the
+ * XPath compiler.
*
+ * @param arg non-null expression that represents the argument.
+ * @param argNum The argument number index.
*
- * NEEDSDOC @param arg
- * NEEDSDOC @param argNum
- *
- * @throws WrongNumberArgsException
+ * @throws WrongNumberArgsException If the argNum parameter is beyond what
+ * is specified for this function.
*/
public void setArg(Expression arg, int argNum)
throws WrongNumberArgsException
@@ -94,10 +95,12 @@
}
/**
- * NEEDSDOC Method checkNumberArgs
- *
+ * 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.
*
- * NEEDSDOC @param argNum
+ * @param argNum The number of arguments that is being passed to the function.
*
* @throws WrongNumberArgsException
*/
1.3 +13 -13 xml-xalan/java/src/org/apache/xpath/functions/Function2Args.java
Index: Function2Args.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/Function2Args.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Function2Args.java 2000/10/30 18:59:48 1.2
+++ Function2Args.java 2000/12/16 20:01:55 1.3
@@ -59,20 +59,20 @@
import org.apache.xpath.Expression;
/**
- * <meta name="usage" content="internal"/>
- * NEEDSDOC Class Function2Args <needs-comment/>
+ * <meta name="usage" content="advanced"/>
+ * Base class for functions that accept two arguments.
*/
public class Function2Args extends FunctionOneArg
{
- /** NEEDSDOC Field m_arg1 */
+ /** The second argument passed to the function (at index 1). */
Expression m_arg1;
/**
- * NEEDSDOC Method getArg1
+ * Return the second argument passed to the function (at index 1).
*
- *
- * NEEDSDOC (getArg1) @return
+ * @return An expression that represents the second argument passed to the
+ * function.
*/
public Expression getArg1()
{
@@ -80,13 +80,13 @@
}
/**
- * NEEDSDOC Method setArg
- *
+ * Set an argument expression for a function. This method is called by the
+ * XPath compiler.
*
- * NEEDSDOC @param arg
- * NEEDSDOC @param argNum
+ * @param arg non-null expression that represents the argument.
+ * @param argNum The argument number index.
*
- * @throws WrongNumberArgsException
+ * @throws WrongNumberArgsException If the argNum parameter is greater than 1.
*/
public void setArg(Expression arg, int argNum)
throws WrongNumberArgsException
@@ -102,10 +102,10 @@
}
/**
- * NEEDSDOC Method checkNumberArgs
+ * Check that the number of arguments passed to this function is correct.
*
*
- * NEEDSDOC @param argNum
+ * @param argNum The number of arguments that is being passed to the function.
*
* @throws WrongNumberArgsException
*/
1.4 +13 -13 xml-xalan/java/src/org/apache/xpath/functions/Function3Args.java
Index: Function3Args.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/Function3Args.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Function3Args.java 2000/10/30 18:59:48 1.3
+++ Function3Args.java 2000/12/16 20:01:55 1.4
@@ -59,20 +59,20 @@
import org.apache.xpath.Expression;
/**
- * <meta name="usage" content="internal"/>
- * NEEDSDOC Class Function3Args <needs-comment/>
+ * <meta name="usage" content="advanced"/>
+ * Base class for functions that accept three arguments.
*/
public class Function3Args extends Function2Args
{
- /** NEEDSDOC Field m_arg2 */
+ /** The third argument passed to the function (at index 2). */
Expression m_arg2;
/**
- * NEEDSDOC Method getArg2
+ * Return the third argument passed to the function (at index 2).
*
- *
- * NEEDSDOC (getArg2) @return
+ * @return An expression that represents the third argument passed to the
+ * function.
*/
public Expression getArg2()
{
@@ -80,13 +80,13 @@
}
/**
- * NEEDSDOC Method setArg
- *
+ * Set an argument expression for a function. This method is called by the
+ * XPath compiler.
*
- * NEEDSDOC @param arg
- * NEEDSDOC @param argNum
+ * @param arg non-null expression that represents the argument.
+ * @param argNum The argument number index.
*
- * @throws WrongNumberArgsException
+ * @throws WrongNumberArgsException If the argNum parameter is greater than 2.
*/
public void setArg(Expression arg, int argNum)
throws WrongNumberArgsException
@@ -101,10 +101,10 @@
}
/**
- * NEEDSDOC Method checkNumberArgs
+ * Check that the number of arguments passed to this function is correct.
*
*
- * NEEDSDOC @param argNum
+ * @param argNum The number of arguments that is being passed to the function.
*
* @throws WrongNumberArgsException
*/
1.4 +29 -21 xml-xalan/java/src/org/apache/xpath/functions/FunctionDef1Arg.java
Index: FunctionDef1Arg.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FunctionDef1Arg.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FunctionDef1Arg.java 2000/11/13 16:27:35 1.3
+++ FunctionDef1Arg.java 2000/12/16 20:01:55 1.4
@@ -63,21 +63,24 @@
import org.apache.xpath.objects.XNumber;
/**
- * <meta name="usage" content="internal"/>
- * NEEDSDOC Class FunctionDef1Arg <needs-comment/>
+ * <meta name="usage" content="advanced"/>
+ * Base class for functions that accept one argument that can be defaulted if
+ * not specified.
*/
public class FunctionDef1Arg extends FunctionOneArg
{
/**
- * NEEDSDOC Method getArg0AsNode
+ * Execute the first argument expression that is expected to return a
+ * nodeset. If the argument is null, then return the current context node.
*
+ * @param xctxt Runtime XPath context.
*
- * NEEDSDOC @param xctxt
+ * @return The first node of the executed nodeset, or the current context
+ * node if the first argument is null.
*
- * NEEDSDOC (getArg0AsNode) @return
- *
- * @throws javax.xml.transform.TransformerException
+ * @throws javax.xml.transform.TransformerException if an error occurs while
+ * executing the argument expression.
*/
protected Node getArg0AsNode(XPathContext xctxt)
throws javax.xml.transform.TransformerException
@@ -89,14 +92,17 @@
}
/**
- * NEEDSDOC Method getArg0AsString
- *
+ * Execute the first argument expression that is expected to return a
+ * string. If the argument is null, then get the string value from the
+ * current context node.
*
- * NEEDSDOC @param xctxt
+ * @param xctxt Runtime XPath context.
*
- * NEEDSDOC (getArg0AsString) @return
+ * @return The string value of the first argument, or the string value of the
+ * current context node if the first argument is null.
*
- * @throws javax.xml.transform.TransformerException
+ * @throws javax.xml.transform.TransformerException if an error occurs while
+ * executing the argument expression.
*/
protected String getArg0AsString(XPathContext xctxt)
throws javax.xml.transform.TransformerException
@@ -108,14 +114,17 @@
}
/**
- * NEEDSDOC Method getArg0AsNumber
+ * Execute the first argument expression that is expected to return a
+ * number. If the argument is null, then get the number value from the
+ * current context node.
*
+ * @param xctxt Runtime XPath context.
*
- * NEEDSDOC @param xctxt
+ * @return The number value of the first argument, or the number value of the
+ * current context node if the first argument is null.
*
- * NEEDSDOC (getArg0AsNumber) @return
- *
- * @throws javax.xml.transform.TransformerException
+ * @throws javax.xml.transform.TransformerException if an error occurs while
+ * executing the argument expression.
*/
protected double getArg0AsNumber(XPathContext xctxt)
throws javax.xml.transform.TransformerException
@@ -127,12 +136,11 @@
}
/**
- * NEEDSDOC Method checkNumberArgs
- *
+ * Check that the number of arguments passed to this function is correct.
*
- * NEEDSDOC @param argNum
+ * @param argNum The number of arguments that is being passed to the function.
*
- * @throws WrongNumberArgsException
+ * @throws WrongNumberArgsException if the number of arguments is not 0 or 1.
*/
public void checkNumberArgs(int argNum) throws WrongNumberArgsException
{
1.4 +12 -10 xml-xalan/java/src/org/apache/xpath/functions/FunctionMultiArgs.java
Index: FunctionMultiArgs.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FunctionMultiArgs.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- FunctionMultiArgs.java 2000/10/30 18:59:49 1.3
+++ FunctionMultiArgs.java 2000/12/16 20:01:55 1.4
@@ -59,23 +59,25 @@
import org.apache.xpath.Expression;
/**
- * <meta name="usage" content="internal"/>
- * NEEDSDOC Class FunctionMultiArgs <needs-comment/>
+ * <meta name="usage" content="advanced"/>
+ * Base class for functions that accept an undetermined number of multiple
+ * arguments.
*/
public class FunctionMultiArgs extends Function3Args
{
- /** NEEDSDOC Field m_args */
+ /** Argument expressions that are at index 3 or greater. */
Expression[] m_args;
/**
- * NEEDSDOC Method setArg
+ * Set an argument expression for a function. This method is called by the
+ * XPath compiler.
*
+ * @param arg non-null expression that represents the argument.
+ * @param argNum The argument number index.
*
- * NEEDSDOC @param arg
- * NEEDSDOC @param argNum
- *
- * @throws WrongNumberArgsException
+ * @throws WrongNumberArgsException If a derived class determines that the
+ * number of arguments is incorrect.
*/
public void setArg(Expression arg, int argNum)
throws WrongNumberArgsException
@@ -105,10 +107,10 @@
}
/**
- * NEEDSDOC Method checkNumberArgs
+ * Check that the number of arguments passed to this function is correct.
*
*
- * NEEDSDOC @param argNum
+ * @param argNum The number of arguments that is being passed to the function.
*
* @throws WrongNumberArgsException
*/
1.3 +13 -13 xml-xalan/java/src/org/apache/xpath/functions/FunctionOneArg.java
Index: FunctionOneArg.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FunctionOneArg.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FunctionOneArg.java 2000/10/30 18:59:50 1.2
+++ FunctionOneArg.java 2000/12/16 20:01:55 1.3
@@ -59,20 +59,20 @@
import org.apache.xpath.Expression;
/**
- * <meta name="usage" content="internal"/>
- * NEEDSDOC Class FunctionOneArg <needs-comment/>
+ * <meta name="usage" content="advanced"/>
+ * Base class for functions that accept one argument.
*/
public class FunctionOneArg extends Function
{
- /** NEEDSDOC Field m_arg0 */
+ /** The first argument passed to the function (at index 0). */
Expression m_arg0;
/**
- * NEEDSDOC Method getArg0
+ * Return the first argument passed to the function (at index 0).
*
- *
- * NEEDSDOC (getArg0) @return
+ * @return An expression that represents the first argument passed to the
+ * function.
*/
public Expression getArg0()
{
@@ -80,13 +80,13 @@
}
/**
- * NEEDSDOC Method setArg
- *
+ * Set an argument expression for a function. This method is called by the
+ * XPath compiler.
*
- * NEEDSDOC @param arg
- * NEEDSDOC @param argNum
+ * @param arg non-null expression that represents the argument.
+ * @param argNum The argument number index.
*
- * @throws WrongNumberArgsException
+ * @throws WrongNumberArgsException If the argNum parameter is greater than 0.
*/
public void setArg(Expression arg, int argNum)
throws WrongNumberArgsException
@@ -99,10 +99,10 @@
}
/**
- * NEEDSDOC Method checkNumberArgs
+ * Check that the number of arguments passed to this function is correct.
*
*
- * NEEDSDOC @param argNum
+ * @param argNum The number of arguments that is being passed to the function.
*
* @throws WrongNumberArgsException
*/
1.3 +6 -10 xml-xalan/java/src/org/apache/xpath/functions/WrongNumberArgsException.java
Index: WrongNumberArgsException.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/WrongNumberArgsException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- WrongNumberArgsException.java 2000/10/30 18:59:50 1.2
+++ WrongNumberArgsException.java 2000/12/16 20:01:55 1.3
@@ -57,26 +57,22 @@
package org.apache.xpath.functions;
/**
- * <meta name="usage" content="internal"/>
- * NEEDSDOC Class WrongNumberArgsException <needs-comment/>
+ * <meta name="usage" content="advanced"/>
+ * An exception that is thrown if the wrong number of arguments to an exception
+ * are specified by the stylesheet.
*/
public class WrongNumberArgsException extends Exception
{
- /** NEEDSDOC Field m_argsExpected */
- public String m_argsExpected;
-
/**
* Constructor WrongNumberArgsException
- *
*
- * NEEDSDOC @param argsExpected
+ * @param argsExpected Error message that tells the number of arguments that
+ * were expected.
*/
public WrongNumberArgsException(String argsExpected)
{
-
- super();
- m_argsExpected = argsExpected;
+ super(argsExpected);
}
}