Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.jxpath.ri.compiler
Class TreeCompiler

    java.lang.Object
      org.apache.commons.jxpath.ri.compiler.TreeCompiler

All Implemented Interfaces:
  Compiler

    public class TreeCompiler

extends Object
implements Compiler

Version:
  $Revision: 652845 $ $Date: 2008-05-02 12:46:46 -0500 (Fri, 02 May 2008) $
Author:
  Dmitri Plotnikov

Field Summary

Fields inherited from interface org.apache.commons.jxpath.ri.Compiler
`AXIS_ANCESTOR, AXIS_ANCESTOR_OR_SELF, AXIS_ATTRIBUTE, AXIS_CHILD, AXIS_DESCENDANT, AXIS_DESCENDANT_OR_SELF, AXIS_FOLLOWING, AXIS_FOLLOWING_SIBLING, AXIS_NAMESPACE, AXIS_PARENT, AXIS_PRECEDING, AXIS_PRECEDING_SIBLING, AXIS_SELF, FUNCTION_BOOLEAN, FUNCTION_CEILING, FUNCTION_CONCAT, FUNCTION_CONTAINS, FUNCTION_COUNT, FUNCTION_FALSE, FUNCTION_FLOOR, FUNCTION_FORMAT_NUMBER, FUNCTION_ID, FUNCTION_KEY, FUNCTION_LANG, FUNCTION_LAST, FUNCTION_LOCAL_NAME, FUNCTION_NAME, FUNCTION_NAMESPACE_URI, FUNCTION_NORMALIZE_SPACE, FUNCTION_NOT, FUNCTION_NULL, FUNCTION_NUMBER, FUNCTION_POSITION, FUNCTION_ROUND, FUNCTION_STARTS_WITH, FUNCTION_STRING, FUNCTION_STRING_LENGTH, FUNCTION_SUBSTRING, FUNCTION_SUBSTRING_AFTER, FUNCTION_SUBSTRING_BEFORE, FUNCTION_SUM, FUNCTION_TRANSLATE, FUNCTION_TRUE, NODE_TYPE_COMMENT, NODE_TYPE_NODE, NODE_TYPE_PI, NODE_TYPE_TEXT`

Constructor Summary
`TreeCompiler()`

Method Summary
`Object` | `and(Object[] arguments)` Produces an EXPRESSION object representing logical conjunction of all arguments
`Object` | `divide(Object left, Object right)` Produces an EXPRESSION object representing left divided by right
`Object` | `equal(Object left, Object right)` Produces an EXPRESSION object representing the comparison: left equals to right
`Object` | `expressionPath(Object expression, Object[] predicates, Object[] steps)` Produces an EXPRESSION object representing a filter expression
`Object` | `function(int code, Object[] args)` Produces an EXPRESSION object representing the computation of a core function with the supplied arguments.
`Object` | `function(Object name, Object[] args)` Produces an EXPRESSION object representing the computation of a library function with the supplied arguments.
`Object` | `greaterThan(Object left, Object right)` Produces an EXPRESSION object representing the comparison: left greater than right
`Object` | `greaterThanOrEqual(Object left, Object right)` Produces an EXPRESSION object representing the comparison: left greater than or equal to right
`Object` | `lessThan(Object left, Object right)` Produces an EXPRESSION object representing the comparison: left less than right
`Object` | `lessThanOrEqual(Object left, Object right)` Produces an EXPRESSION object representing the comparison: left less than or equal to right
`Object` | `literal(String value)` Produces an EXPRESSION object that represents a string constant.
`Object` | `locationPath(boolean absolute, Object[] steps)` Produces an EXPRESSION object representing a location path
`Object` | `minus(Object argument)` Produces an EXPRESSION object representing unary negation of the argument
`Object` | `minus(Object left, Object right)` Produces an EXPRESSION object representing left minus right
`Object` | `mod(Object left, Object right)` Produces an EXPRESSION object representing left modulo right
`Object` | `multiply(Object left, Object right)` Produces an EXPRESSION object representing left multiplied by right
`Object` | `nodeNameTest(Object qname)` Produces a NODE_TEST object that represents a node name test.
`Object` | `nodeTypeTest(int nodeType)` Produces a NODE_TEST object that represents a node type test.
`Object` | `notEqual(Object left, Object right)` Produces an EXPRESSION object representing the comparison: left is not equal to right
`Object` | `number(String value)` Produces an EXPRESSION object that represents a numeric constant.
`Object` | `or(Object[] arguments)` Produces an EXPRESSION object representing logical disjunction of all arguments
`Object` | `processingInstructionTest(String instruction)` Produces a NODE_TEST object that represents a processing instruction test.
`Object` | `qname(String prefix, String name)` Produces an QNAME that represents a name with an optional prefix.
`Object` | `step(int axis, Object nodeTest, Object[] predicates)` Produces a STEP object that represents a node test.
`Object` | `sum(Object[] arguments)` Produces an EXPRESSION object representing the sum of all argumens
`Object` | `union(Object[] arguments)` Produces an EXPRESSION object representing union of all node sets
`Object` | `variableReference(Object qName)` Produces an EXPRESSION object representing variable reference

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TreeCompiler

    public TreeCompiler()

Method Detail

### number

    public Object number(String value)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object that represents a numeric constant.

  Specified by:
    `number` in interface `Compiler`
  Parameters:
    `value` - numeric String
  Returns:
    Object

### literal

    public Object literal(String value)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object that represents a string constant.

  Specified by:
    `literal` in interface `Compiler`
  Parameters:
    `value` - String literal
  Returns:
    Object

### qname

    public Object qname(String prefix,
                        String name)

  Description copied from interface: `Compiler`
  Produces an QNAME that represents a name with an optional prefix.

  Specified by:
    `qname` in interface `Compiler`
  Parameters:
    `prefix` - String prefix
    `name` - String name
  Returns:
    Object

### sum

    public Object sum(Object[] arguments)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing the sum of all argumens

  Specified by:
    `sum` in interface `Compiler`
  Parameters:
    `arguments` - are EXPRESSION objects
  Returns:
    Object

### minus

    public Object minus(Object left,
                        Object right)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing left minus right

  Specified by:
    `minus` in interface `Compiler`
  Parameters:
    `left` - is an EXPRESSION object
    `right` - is an EXPRESSION object
  Returns:
    Object

### multiply

    public Object multiply(Object left,
                           Object right)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing left multiplied by right

  Specified by:
    `multiply` in interface `Compiler`
  Parameters:
    `left` - is an EXPRESSION object
    `right` - is an EXPRESSION object
  Returns:
    Object

### divide

    public Object divide(Object left,
                         Object right)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing left divided by right

  Specified by:
    `divide` in interface `Compiler`
  Parameters:
    `left` - is an EXPRESSION object
    `right` - is an EXPRESSION object
  Returns:
    Object

### mod

    public Object mod(Object left,
                      Object right)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing left modulo right

  Specified by:
    `mod` in interface `Compiler`
  Parameters:
    `left` - is an EXPRESSION object
    `right` - is an EXPRESSION object
  Returns:
    Object

### lessThan

    public Object lessThan(Object left,
                           Object right)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing the comparison: left less than right

  Specified by:
    `lessThan` in interface `Compiler`
  Parameters:
    `left` - is an EXPRESSION object
    `right` - is an EXPRESSION object
  Returns:
    Object

### lessThanOrEqual

    public Object lessThanOrEqual(Object left,
                                  Object right)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing the comparison: left less than or equal to right

  Specified by:
    `lessThanOrEqual` in interface `Compiler`
  Parameters:
    `left` - is an EXPRESSION object
    `right` - is an EXPRESSION object
  Returns:
    Object

### greaterThan

    public Object greaterThan(Object left,
                              Object right)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing the comparison: left greater than right

  Specified by:
    `greaterThan` in interface `Compiler`
  Parameters:
    `left` - is an EXPRESSION object
    `right` - is an EXPRESSION object
  Returns:
    Object

### greaterThanOrEqual

    public Object greaterThanOrEqual(Object left,
                                     Object right)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing the comparison: left greater than or equal to right

  Specified by:
    `greaterThanOrEqual` in interface `Compiler`
  Parameters:
    `left` - is an EXPRESSION object
    `right` - is an EXPRESSION object
  Returns:
    Object

### equal

    public Object equal(Object left,
                        Object right)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing the comparison: left equals to right

  Specified by:
    `equal` in interface `Compiler`
  Parameters:
    `left` - is an EXPRESSION object
    `right` - is an EXPRESSION object
  Returns:
    Object

### notEqual

    public Object notEqual(Object left,
                           Object right)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing the comparison: left is not equal to right

  Specified by:
    `notEqual` in interface `Compiler`
  Parameters:
    `left` - is an EXPRESSION object
    `right` - is an EXPRESSION object
  Returns:
    Object

### minus

    public Object minus(Object argument)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing unary negation of the argument

  Specified by:
    `minus` in interface `Compiler`
  Parameters:
    `argument` - is an EXPRESSION object
  Returns:
    Object

### variableReference

    public Object variableReference(Object qName)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing variable reference

  Specified by:
    `variableReference` in interface `Compiler`
  Parameters:
    `qName` - is a QNAME object
  Returns:
    Object

### function

    public Object function(int code,
                           Object[] args)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing the computation of a core function with the supplied arguments.

  Specified by:
    `function` in interface `Compiler`
  Parameters:
    `code` - is one of FUNCTION_... constants
    `args` - are EXPRESSION objects
  Returns:
    Object

### function

    public Object function(Object name,
                           Object[] args)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing the computation of a library function with the supplied arguments.

  Specified by:
    `function` in interface `Compiler`
  Parameters:
    `name` - is a QNAME object (function name)
    `args` - are EXPRESSION objects
  Returns:
    Object

### and

    public Object and(Object[] arguments)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing logical conjunction of all arguments

  Specified by:
    `and` in interface `Compiler`
  Parameters:
    `arguments` - are EXPRESSION objects
  Returns:
    Object

### or

    public Object or(Object[] arguments)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing logical disjunction of all arguments

  Specified by:
    `or` in interface `Compiler`
  Parameters:
    `arguments` - are EXPRESSION objects
  Returns:
    Object

### union

    public Object union(Object[] arguments)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing union of all node sets

  Specified by:
    `union` in interface `Compiler`
  Parameters:
    `arguments` - are EXPRESSION objects
  Returns:
    Object

### locationPath

    public Object locationPath(boolean absolute,
                               Object[] steps)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing a location path

  Specified by:
    `locationPath` in interface `Compiler`
  Parameters:
    `absolute` - indicates whether the path is absolute
    `steps` - are STEP objects
  Returns:
    Object

### expressionPath

    public Object expressionPath(Object expression,
                                 Object[] predicates,
                                 Object[] steps)

  Description copied from interface: `Compiler`
  Produces an EXPRESSION object representing a filter expression

  Specified by:
    `expressionPath` in interface `Compiler`
  Parameters:
    `expression` - is an EXPRESSION object
    `predicates` - are EXPRESSION objects
    `steps` - are STEP objects
  Returns:
    Object

### nodeNameTest

    public Object nodeNameTest(Object qname)

  Description copied from interface: `Compiler`
  Produces a NODE_TEST object that represents a node name test.

  Specified by:
    `nodeNameTest` in interface `Compiler`
  Parameters:
    `qname` - is a QNAME object
  Returns:
    Object

### nodeTypeTest

    public Object nodeTypeTest(int nodeType)

  Description copied from interface: `Compiler`
  Produces a NODE_TEST object that represents a node type test.

  Specified by:
    `nodeTypeTest` in interface `Compiler`
  Parameters:
    `nodeType` - is a NODE_TEST object
  Returns:
    Object

### processingInstructionTest

    public Object processingInstructionTest(String instruction)

  Description copied from interface: `Compiler`
  Produces a NODE_TEST object that represents a processing instruction test.

  Specified by:
    `processingInstructionTest` in interface `Compiler`
  Parameters:
    `instruction` - is a NODE_TEST object
  Returns:
    Object

### step

    public Object step(int axis,
                       Object nodeTest,
                       Object[] predicates)

  Description copied from interface: `Compiler`
  Produces a STEP object that represents a node test.

  Specified by:
    `step` in interface `Compiler`
  Parameters:
    `axis` - is one of the AXIS_... constants
    `nodeTest` - is a NODE_TEST object
    `predicates` - are EXPRESSION objects
  Returns:
    Object

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.