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