Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-999

FuncExtFunction And FunctionMultiArgs need public accessor methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 2.3Dx
    • None
    • XPath
    • 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.

      Attachments

        Activity

          People

            mkwan@ca.ibm.com Morris Kwan
            rich.mayfield@peregrine.com Rich Mayfield
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: