KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > xpath > XPathVariableResolver


1 // $Id: XPathVariableResolver.java,v 1.6 2003/12/08 04:40:47 jsuttor Exp $
2

3 /*
4  * @(#)XPathVariableResolver.java 1.5 04/07/26
5  *
6  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
7  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
8  */

9
10 package javax.xml.xpath;
11
12 import javax.xml.namespace.QName JavaDoc;
13
14 /**
15  * <p><code>XPathVariableResolver</code> provides access to the set of user defined XPath variables.</p>
16  *
17  * <p>The <code>XPathVariableResolver</code> and the XPath evaluator must adhere to a contract that
18  * cannot be directly enforced by the API. Although variables may be mutable,
19  * that is, an application may wish to evaluate the same XPath expression more
20  * than once with different variable values, in the course of evaluating any
21  * single XPath expression, a variable's value <strong><em>must</em></strong> be immutable.</p>
22  *
23  * @author <a HREF="mailto:Norman.Walsh@Sun.com">Norman Walsh</a>
24  * @author <a HREF="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
25  * @version $Revision: 1.6 $, $Date: 2003/12/08 04:40:47 $
26  * @since 1.5
27  */

28 public interface XPathVariableResolver {
29   /**
30    * <p>Find a variable in the set of available variables.</p>
31    *
32    * <p>If <code>variableName</code> is <code>null</code>, then a <code>NullPointerException</code> is thrown.</p>
33    *
34    * @param variableName The <code>QName</code> of the variable name.
35    *
36    * @return The variables value, or <code>null</code> if no variable named <code>variableName</code>
37    * exists. The value returned must be of a type appropriate for the underlying object model.
38    *
39    * @throws NullPointerException If <code>variableName</code> is <code>null</code>.
40    */

41   public Object JavaDoc resolveVariable(QName JavaDoc variableName);
42 }
43
Popular Tags