You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mk...@apache.org on 2002/10/03 17:42:19 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/functions FuncExtFunction.java
mkwan 2002/10/03 08:42:18
Modified: java/src/org/apache/xpath/functions FuncExtFunction.java
Log:
Use Vector.elementAt() instead of Vector.get(). The latter is not available
in JDK 1.1.8. Add two argument accessor methods for Bugzilla 8939.
Revision Changes Path
1.18 +36 -2 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.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- FuncExtFunction.java 6 Sep 2002 18:12:24 -0000 1.17
+++ FuncExtFunction.java 3 Oct 2002 15:42:18 -0000 1.18
@@ -140,16 +140,50 @@
}
}
}
- //called by StylesheetHandler.createXPath() -- dml
+
+ /**
+ * Return the namespace of the extension function.
+ *
+ * @return The namespace of the extension function.
+ */
public String getNamespace()
{
return m_namespace;
}
+
+ /**
+ * Return the name of the extension function.
+ *
+ * @return The name of the extension function.
+ */
public String getFunctionName()
{
return m_extensionName;
}
+ /**
+ * Return the nth argument passed to the extension function.
+ *
+ * @param n The argument number index.
+ * @return The Expression object at the given index.
+ */
+ public Expression getArg(int n) {
+ if (n >= 0 && n < m_argVec.size())
+ return (Expression) m_argVec.elementAt(n);
+ else
+ return null;
+ }
+
+ /**
+ * Return the number of arguments that were passed
+ * into this extension function.
+ *
+ * @return The number of arguments.
+ */
+ public int getArgCount() {
+ return m_argVec.size();
+ }
+
/**
* Create a new FuncExtFunction based on the qualified name of the extension,
* and a unique method key.
@@ -275,7 +309,7 @@
{
for (int i = 0; i < m_argVec.size(); i++)
{
- Expression exp = (Expression)m_argVec.get(i);
+ Expression exp = (Expression)m_argVec.elementAt(i);
exp.callVisitors(new ArgExtOwner(exp), visitor);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org