com.caucho.xpath.expr
Class VarExpr

java.lang.Object
  extended by com.caucho.xpath.Expr
      extended by com.caucho.xpath.expr.VarExpr

public class VarExpr
extends Expr


Field Summary
 
Fields inherited from class com.caucho.xpath.Expr
ADD, AND, ATTRIBUTE, BASE_URI, BOOLEAN, BOOLEAN_EQ, BOOLEAN_NEQ, CEILING, CONCAT, CONST, CONTAINS, COUNT, DIV, ELEMENT, EQ, FALSE, FLOOR, FORMAT_NUMBER, FUNCTION_AVAILABLE, GE, GENERATE_ID, GT, ID, IF, LANG, LAST, LAST_FUN, LE, LOCAL_PART, LT, MOD, MUL, NAMESPACE, NEG, NEQ, NODE_SET, NORMALIZE, NOT, NUMBER, NUMBER_EQ, NUMBER_GE, NUMBER_GT, NUMBER_LE, NUMBER_LT, NUMBER_NEQ, OR, POSITION, QNAME, QUO, ROUND, SELF, SELF_NAME, STARTS_WITH, STRING, STRING_EQ, STRING_LENGTH, STRING_NEQ, SUB, SUBSTRING, SUBSTRING_AFTER, SUBSTRING_BEFORE, SUM, SYSTEM_PROPERTY, TRANSLATE, TRUE
 
Constructor Summary
VarExpr(java.lang.String name)
           
 
Method Summary
 boolean evalBoolean(org.w3c.dom.Node node, ExprEnvironment env)
          Returns the value of the variable as a boolean.
 NodeIterator evalNodeSet(org.w3c.dom.Node node, ExprEnvironment env)
          Returns the value of the variable as a node set.
 double evalNumber(org.w3c.dom.Node node, ExprEnvironment env)
          Returns the value of the variable as a double.
 java.lang.Object evalObject(org.w3c.dom.Node node, ExprEnvironment env)
          Returns the value of the variable as an object
 void evalString(CharBuffer cb, org.w3c.dom.Node node, ExprEnvironment env)
          Returns the value of the variable as a string
 java.lang.String evalString(org.w3c.dom.Node node, ExprEnvironment env)
          Returns the value of the variable as a string
 Var evalVar(org.w3c.dom.Node node, ExprEnvironment env)
          Returns the value of the variable as an variable
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.xpath.Expr
addParam, addVar, evalBoolean, evalNodeSet, evalNumber, evalObject, evalString, evalString, getListContext, isBoolean, isNodeSet, isNumber, isString, setListContext, setVar, stringToNumber, toBoolean, toDouble, toNode, toNodeList, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VarExpr

public VarExpr(java.lang.String name)
Method Detail

evalBoolean

public boolean evalBoolean(org.w3c.dom.Node node,
                           ExprEnvironment env)
                    throws XPathException
Returns the value of the variable as a boolean.

Specified by:
evalBoolean in class Expr
Parameters:
node - the current node
env - the XPath envivonment
Returns:
the boolean value
Throws:
XPathException

evalNumber

public double evalNumber(org.w3c.dom.Node node,
                         ExprEnvironment env)
                  throws XPathException
Returns the value of the variable as a double.

Specified by:
evalNumber in class Expr
Parameters:
node - the current node
env - the XPath envivonment
Returns:
the double value
Throws:
XPathException

evalString

public void evalString(CharBuffer cb,
                       org.w3c.dom.Node node,
                       ExprEnvironment env)
                throws XPathException
Returns the value of the variable as a string

Overrides:
evalString in class Expr
Parameters:
cb - the buffer to append the value
node - the current node
env - the XPath envivonment
Throws:
XPathException

evalString

public java.lang.String evalString(org.w3c.dom.Node node,
                                   ExprEnvironment env)
                            throws XPathException
Returns the value of the variable as a string

Specified by:
evalString in class Expr
Parameters:
env - the XPath envivonment
node - the current node
Returns:
the string value
Throws:
XPathException

evalObject

public java.lang.Object evalObject(org.w3c.dom.Node node,
                                   ExprEnvironment env)
                            throws XPathException
Returns the value of the variable as an object

Specified by:
evalObject in class Expr
Parameters:
env - the XPath envivonment
node - the current node
Returns:
the value
Throws:
XPathException

evalVar

public Var evalVar(org.w3c.dom.Node node,
                   ExprEnvironment env)
            throws XPathException
Returns the value of the variable as an variable

Overrides:
evalVar in class Expr
Parameters:
node - the current node
env - the XPath envivonment
Returns:
the value
Throws:
XPathException

evalNodeSet

public NodeIterator evalNodeSet(org.w3c.dom.Node node,
                                ExprEnvironment env)
                         throws XPathException
Returns the value of the variable as a node set.

Overrides:
evalNodeSet in class Expr
Parameters:
node - the current node
env - the variable envivonment
Returns:
the value
Throws:
XPathException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object