1
2
3
4 package net.sourceforge.pmd.lang.java.xpath;
5
6 import net.sf.saxon.expr.XPathContext;
7 import net.sourceforge.pmd.lang.ast.Node;
8 import net.sourceforge.pmd.lang.ast.xpath.saxon.ElementNode;
9
10
11
12
13 public final class JavaFunctions {
14
15 private JavaFunctions() {
16
17 }
18
19 public static boolean typeof(XPathContext context, String nodeTypeName, String fullTypeName) {
20 return typeof(context, nodeTypeName, fullTypeName, null);
21 }
22
23 public static boolean typeof(XPathContext context, String nodeTypeName, String fullTypeName, String shortTypeName) {
24 return TypeOfFunction.typeof((Node) ((ElementNode) context.getContextItem()).getUnderlyingNode(), nodeTypeName,
25 fullTypeName, shortTypeName);
26 }
27 }