1 /**
2 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3 */
4 package net.sourceforge.pmd.lang;
5
6 import net.sf.saxon.sxpath.IndependentContext;
7
8 import org.jaxen.Navigator;
9
10 /**
11 * Interface for performing Language specific XPath handling, such as
12 * initialization and navigation.
13 */
14 public interface XPathHandler {
15
16 XPathHandler DUMMY = new XPathHandler() {
17 public void initialize() {
18 }
19
20 public void initialize(IndependentContext context) {
21 }
22
23 public Navigator getNavigator() {
24 return null;
25 }
26 };
27
28 /**
29 * Initialize. This is intended to be called by {@link Initializer} to
30 * perform Language specific initialization.
31 */
32 void initialize();
33
34 /**
35 * Initialize. This is intended to be called by {@link Initializer} to
36 * perform Language specific initialization for Saxon.
37 */
38 void initialize(IndependentContext context);
39
40 /**
41 * Get a Jaxen Navigator for this Language. May return <code>null</code> if
42 * there is no Jaxen Navigation for this language.
43 */
44 Navigator getNavigator();
45 }