com.plotnix.jex.jxpath
Class JXPathCompiledExpression
java.lang.Object
|
+--com.plotnix.jex.jxpath.JXPathCompiledExpression
- All Implemented Interfaces:
- Expression, IterationExpression, VariableExpression
- public class JXPathCompiledExpression
- extends java.lang.Object
- implements Expression, IterationExpression, VariableExpression
A trivial wrapper for JXPath CompiledExpression.
If Jex becomes a part of Jakarta, JXPath will change to implement
Jex interfaces directly. At that point the need for this adaptor
will disappear.
- Version:
- $Revision$ $Date$
- Author:
- Dmitri Plotnikov
Constructor Summary |
JXPathCompiledExpression(org.apache.commons.jxpath.CompiledExpression expression)
Wraps a jxpath CompiledExpression into a Jex
Expression/IterationExpression/VariableExpression |
Method Summary |
void |
assign(Context context,
java.lang.Object value,
java.lang.Object[] arguments)
Modifies a value in the specified context according to the
expression and the supplied arguments. |
java.lang.Object |
evaluate(Context context,
java.lang.Object[] arguments)
Produces the value described by the expression in the
specified context with the supplied arguments. |
java.lang.Object |
evaluate(Context context,
java.lang.Object[] arguments,
java.lang.Class valueType)
Evaluates the expression and casts the result to the supplied type. |
java.util.Iterator |
iterate(Context context,
java.lang.Object[] arguments)
Produces the iterator described by the expression in the
specified context with the supplied arguments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JXPathCompiledExpression
public JXPathCompiledExpression(org.apache.commons.jxpath.CompiledExpression expression)
- Wraps a jxpath CompiledExpression into a Jex
Expression/IterationExpression/VariableExpression
- Parameters:
expression
- is a jxpath-style Compiled expression
evaluate
public java.lang.Object evaluate(Context context,
java.lang.Object[] arguments)
- Description copied from interface:
Expression
- Produces the value described by the expression in the
specified context with the supplied arguments.
- Specified by:
evaluate
in interface Expression
- See Also:
Expression.evaluate(Context, Object[])
evaluate
public java.lang.Object evaluate(Context context,
java.lang.Object[] arguments,
java.lang.Class valueType)
- Description copied from interface:
Expression
- Evaluates the expression and casts the result to the supplied type.
- Specified by:
evaluate
in interface Expression
- See Also:
Expression.evaluate(Context, Object[], Class)
iterate
public java.util.Iterator iterate(Context context,
java.lang.Object[] arguments)
- Description copied from interface:
IterationExpression
- Produces the iterator described by the expression in the
specified context with the supplied arguments.
- Specified by:
iterate
in interface IterationExpression
- See Also:
IterationExpression.iterate(Context, Object[])
assign
public void assign(Context context,
java.lang.Object value,
java.lang.Object[] arguments)
- Description copied from interface:
VariableExpression
- Modifies a value in the specified context according to the
expression and the supplied arguments. Casts the type of
the value if necessary.
- Specified by:
assign
in interface VariableExpression
- See Also:
VariableExpression.assign(Context, Object, Object[])
Copyright (c) 2002 - Plotnix, Inc