org.basex.data
Class ExprInfo

java.lang.Object
  extended by org.basex.data.ExprInfo
Direct Known Subclasses:
Expr, FTOpt, Pragma, StaticFuncs, StaticScope, Var, Variables

public abstract class ExprInfo
extends java.lang.Object

Expression information, used for debugging and logging.

Author:
BaseX Team 2005-12, BSD License, Christian Gruen

Constructor Summary
ExprInfo()
           
 
Method Summary
protected  void addPlan(FElem plan, FElem el, ExprInfo... expr)
          Adds trees of the specified expressions to the root node.
protected  void addPlan(FElem plan, FElem el, java.lang.Object... expr)
          Adds trees of the specified expressions to the root node.
 java.lang.String description()
          Returns a string description of the expression.
 byte[] info()
          Returns the simplified class name.
abstract  void plan(FElem e)
          Creates an expression tree.
protected  FAttr planAttr(java.lang.Object n, java.lang.Object v)
          Creates a new attribute to be added to the expression tree.
protected  FElem planElem(java.lang.Object... atts)
          Creates a new element node to be added to the expression tree.
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExprInfo

public ExprInfo()
Method Detail

description

public java.lang.String description()
Returns a string description of the expression. This method is only called by error messages. Contrary to the toString() method, arguments are not included in the output.

Returns:
result of check

info

public byte[] info()
Returns the simplified class name.

Returns:
class name

toString

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

plan

public abstract void plan(FElem e)
Creates an expression tree.

Parameters:
e - root element

planElem

protected FElem planElem(java.lang.Object... atts)
Creates a new element node to be added to the expression tree.

Parameters:
atts - optional attribute names and values
Returns:
tree node

addPlan

protected void addPlan(FElem plan,
                       FElem el,
                       java.lang.Object... expr)
Adds trees of the specified expressions to the root node.

Parameters:
plan - root node
el - new element
expr - expressions

addPlan

protected void addPlan(FElem plan,
                       FElem el,
                       ExprInfo... expr)
Adds trees of the specified expressions to the root node.

Parameters:
plan - root node
el - new element
expr - expressions

planAttr

protected FAttr planAttr(java.lang.Object n,
                         java.lang.Object v)
Creates a new attribute to be added to the expression tree.

Parameters:
n - name of attribute
v - value of attribute
Returns:
tree node