You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/05/09 18:33:26 UTC

DO NOT REPLY [Bug 8939] New: - FuncExtFunction And FunctionMultiArgs need public accessor methods

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8939>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8939

FuncExtFunction And FunctionMultiArgs need public accessor methods

           Summary: FuncExtFunction And FunctionMultiArgs need public
                    accessor methods
           Product: XalanJ2
           Version: 2.3Dx
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: org.apache.xpath
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: rich.mayfield@peregrine.com


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.