1. // $Id: XPathFunction.java,v 1.10 2004/02/11 20:14:32 ndw Exp $
  2. /*
  3. * @(#)XPathFunction.java 1.5 04/07/26
  4. *
  5. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  6. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  7. */
  8. package javax.xml.xpath;
  9. import java.util.List;
  10. /**
  11. * <p><code>XPathFunction</code> provides access to XPath functions.</p>
  12. *
  13. * <p>Functions are identified by QName and arity in XPath.</p>
  14. *
  15. * @author <a href="mailto:Norman.Walsh@Sun.com">Norman Walsh</a>
  16. * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
  17. * @version $Revision: 1.10 $, $Date: 2004/02/11 20:14:32 $
  18. * @since 1.5
  19. */
  20. public interface XPathFunction {
  21. /**
  22. * <p>Evaluate the function with the specified arguments.</p>
  23. *
  24. * <p>To the greatest extent possible, side-effects should be avoided in the
  25. * definition of extension functions. The implementation evaluating an
  26. * XPath expression is under no obligation to call extension functions in
  27. * any particular order or any particular number of times.</p>
  28. *
  29. * @param args The arguments, <code>null</code> is a valid value.
  30. *
  31. * @return The result of evaluating the <code>XPath</code> function as an <code>Object</code>.
  32. *
  33. * @throws XPathFunctionException If <code>args</code> cannot be evaluated with this <code>XPath</code> function.
  34. */
  35. public Object evaluate(List args)
  36. throws XPathFunctionException;
  37. }