jd.xml.xpath.expr.misc
Class ProxyExpression

java.lang.Object
  extended byjd.xml.xpath.expr.ExpressionImpl
      extended byjd.xml.xpath.expr.misc.ProxyExpression
All Implemented Interfaces:
Expression
Direct Known Subclasses:
ParenthesisExpression, TraceExpression

public abstract class ProxyExpression
extends ExpressionImpl

ProxyExpression wraps another expression.


Field Summary
protected  Expression expr_
           
 
Fields inherited from interface jd.xml.xpath.expr.Expression
DEP_CONTEXT_NODE, DEP_CONTEXT_POSITION, DEP_CONTEXT_SIZE, DEP_CONTEXT_STATIC, DEP_NONE, DEP_UNKNOWN
 
Constructor Summary
ProxyExpression(Expression expr)
           
 
Method Summary
 void accept(ExpressionVisitor visitor)
          Accept a ExpressionVisitor.
 int getContextDependencies()
          Return a bitfield indicating the expression dependencies on the XPath context.
 Expression getExpression()
           
 int getResultType()
          Return the type of the result object, before any conversions to the desired result type are performed.
 boolean isUniqueFilter()
          Test if this expression only matches one node when used as a predicate filter for a node-set.
 boolean matchesFilter(XPathContext context)
          Evaluate the expression and return if the context node matches the expression when used as predicate filter.
 boolean toBooleanValue(XPathContext context)
          Evaluate the Expression to a boolean.
 double toNumberValue(XPathContext context)
          Evaluate the Expression to a number.
 String toStringValue(XPathContext context)
          Evaluate the Expression to a String.
 XObject toXObject(XPathContext context)
          Evaluate the expression to a XObject.
 
Methods inherited from class jd.xml.xpath.expr.ExpressionImpl
hasContextDependencies, toNode, toNodeSet, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

expr_

protected Expression expr_
Constructor Detail

ProxyExpression

public ProxyExpression(Expression expr)
Method Detail

getExpression

public Expression getExpression()

toXObject

public XObject toXObject(XPathContext context)
Description copied from interface: Expression
Evaluate the expression to a XObject.

Parameters:
context - the evaluation context

toNumberValue

public double toNumberValue(XPathContext context)
Description copied from interface: Expression
Evaluate the Expression to a number.

Parameters:
context - the evaluation context

toStringValue

public String toStringValue(XPathContext context)
Description copied from interface: Expression
Evaluate the Expression to a String.

Parameters:
context - the evaluation context

toBooleanValue

public boolean toBooleanValue(XPathContext context)
Description copied from interface: Expression
Evaluate the Expression to a boolean.

Parameters:
context - the evaluation context

getResultType

public int getResultType()
Description copied from interface: Expression
Return the type of the result object, before any conversions to the desired result type are performed. If the result type is not known XObject.TYPE_VARIABLE is returned.


matchesFilter

public boolean matchesFilter(XPathContext context)
Description copied from class: ExpressionImpl
Evaluate the expression and return if the context node matches the expression when used as predicate filter.

Specified by:
matchesFilter in interface Expression
Overrides:
matchesFilter in class ExpressionImpl

isUniqueFilter

public boolean isUniqueFilter()
Description copied from class: ExpressionImpl
Test if this expression only matches one node when used as a predicate filter for a node-set. The default implementation returns true if the result type is NUMBER.

Specified by:
isUniqueFilter in interface Expression
Overrides:
isUniqueFilter in class ExpressionImpl

getContextDependencies

public int getContextDependencies()
Description copied from interface: Expression
Return a bitfield indicating the expression dependencies on the XPath context.


accept

public void accept(ExpressionVisitor visitor)
Description copied from interface: Expression
Accept a ExpressionVisitor.