| java.lang.Object org.apache.commons.jxpath.ClassFunctions
ClassFunctions | public class ClassFunctions implements Functions(Code) | | Extension functions provided by a Java class.
Let's say, we declared a ClassFunction like this:
new ClassFunctions(Integer.class, "int")
We can now use XPaths like:
"int:new(3)"
- Equivalent to
new Integer(3)
"int:getInteger('foo')"
- Equivalent to
Integer.getInteger("foo")
"int:floatValue(int:new(4))"
- Equivalent to
new Integer(4).floatValue()
If the first argument of a method is ExpressionContext, the
expression context in which the function is evaluated is passed to
the method.
author: Dmitri Plotnikov version: $Revision: 1.9 $ $Date: 2004/02/29 14:17:42 $ |
Method Summary | |
public Function | getFunction(String namespace, String name, Object[] parameters) Returns a Function, if any, for the specified namespace,
name and parameter types.
Parameters: namespace - if it is not the namespace specified in the constructor,the method returns null Parameters: name - is a function name or "new" for a constructor. | public Set | getUsedNamespaces() Returns a set of one namespace - the one specified in the constructor. |
getFunction | public Function getFunction(String namespace, String name, Object[] parameters)(Code) | | Returns a Function, if any, for the specified namespace,
name and parameter types.
Parameters: namespace - if it is not the namespace specified in the constructor,the method returns null Parameters: name - is a function name or "new" for a constructor. a MethodFunction, a ConstructorFunction or null if there is nosuch function. |
getUsedNamespaces | public Set getUsedNamespaces()(Code) | | Returns a set of one namespace - the one specified in the constructor.
|
|
|