Details
-
Bug
-
Status: Resolved
-
Resolution: Fixed
-
2.3Dx
-
None
-
None
-
Operating System: Other
Platform: All
-
8939
Description
The motivation behind this is similar to that for Bug 7159 (which has been
fixed).
We use Xalan's XPath support to create an Expression "tree" and we walk the
tree.
All of the following are currently package private members of FuncExtFunction:
m_argVec
m_extensionName
m_namespace
We need this information to be exposed via public accessors. We've had to
implement something like the following for our own internal use.
/** Returns the argNum'th argument that was passed to the
- function.
- @param argNum Which argument to return.
- @return The Expression object representing the argument.
*/
public Expression getArg(int argNum) { return (Expression) m_argVec.elementAt(argNum); }
/**
- Returns the number of arguments that were passed
- into this function.
- @return The number of arguments.
*/
public int getArgCount() { return m_argVec.size(); }
/**
- Get the extension (i.e. function) name.
- @return The extension name.
*/
public String getExtensionName() { return m_extensionName; }
/**
- Get the namespace.
- @return The namespace.
*/
public String getNamespace() { return m_namespace; }
Likewise, FunctionMultiArgs has a m_args member that is package private and
this needs a public accessor method as well.
Both of the above suggestions are in alignment with how the other
org.apache.xpath.functions.Function* classes expose their members through
accessors.