Package org.jaxen
Class XPathFunctionContext
- java.lang.Object
-
- org.jaxen.SimpleFunctionContext
-
- org.jaxen.XPathFunctionContext
-
- All Implemented Interfaces:
FunctionContext
public class XPathFunctionContext extends SimpleFunctionContext
AFunctionContext
implementing the core XPath function library, plus Jaxen extensions.The core XPath function library is provided through this implementation of
FunctionContext
. Additionally, extension functions have been provided, as enumerated below.This class is re-entrant and thread-safe. If using the default instance, it is inadvisable to call
SimpleFunctionContext.registerFunction(String, String, Function)
as that will extend the global function context, affecting other users.Extension functions:
- evaluate(..)
- upper-case(..)
- lower-case(..)
- ends-with(..)
-
-
Field Summary
Fields Modifier and Type Field Description private static XPathFunctionContext
instance
-
Constructor Summary
Constructors Constructor Description XPathFunctionContext()
Create a new XPath function context.XPathFunctionContext(boolean includeExtensionFunctions)
Create a new XPath function context.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FunctionContext
getInstance()
Retrieve the default function contextprivate void
registerExtensionFunctions()
private void
registerXPathFunctions()
private void
registerXSLTFunctions()
-
Methods inherited from class org.jaxen.SimpleFunctionContext
getFunction, registerFunction
-
-
-
-
Field Detail
-
instance
private static XPathFunctionContext instance
-
-
Constructor Detail
-
XPathFunctionContext
public XPathFunctionContext()
Create a new XPath function context. All core XPath and Jaxen extension functions are registered.
-
XPathFunctionContext
public XPathFunctionContext(boolean includeExtensionFunctions)
Create a new XPath function context. All core XPath functions are registered.- Parameters:
includeExtensionFunctions
- if true extension functions are included; if false, they aren't
-
-
Method Detail
-
getInstance
public static FunctionContext getInstance()
Retrieve the default function context- Returns:
- the default function context
-
registerXPathFunctions
private void registerXPathFunctions()
-
registerXSLTFunctions
private void registerXSLTFunctions()
-
registerExtensionFunctions
private void registerExtensionFunctions()
-
-