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 class JavaFunctions {
14
15 public static boolean typeof(XPathContext context, String nodeTypeName, String fullTypeName) {
16 return typeof(context, nodeTypeName, fullTypeName, null);
17 }
18
19 public static boolean typeof(XPathContext context, String nodeTypeName, String fullTypeName, String shortTypeName) {
20 return TypeOfFunction.typeof((Node) ((ElementNode) context.getContextItem()).getUnderlyingNode(), nodeTypeName,
21 fullTypeName, shortTypeName);
22 }
23 }