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