Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.parser.util
Class ExpressionStack

java.lang.Object
  extended by oracle.javatools.parser.util.ArrayListHeap
      extended by oracle.javatools.parser.util.ExpressionStack


public class ExpressionStack
extends ArrayListHeap

The ExpressionStack is used for generating an expression tree out of a stream of expressions in infix notation. Expressions should implement the ExpressionObject interface. To use, instantiate an ExpressionStack object and provide your stream of expressions to this ExpressionStack via the add(...) method. When done, call process() to process through the expressions and generate the expression tree. The tree is built via ExpressionObject's addOperand(...) and closeOperator(...) methods.


Constructor Summary
ExpressionStack()
           

 

Method Summary
 void add(ExpressionObject e)
          Adds an ExpressionObject as in an infix stream.
 ExpressionObject process()
          Takes the stream of ExpressionObjects in infix order via the method add(...) and generates a tree of ExpressionObjects.
 void setClosingArgument(java.lang.Object arg)
           

 

Methods inherited from class oracle.javatools.parser.util.ArrayListHeap
allocArrayList, freeArrayList

 

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

 

Constructor Detail

ExpressionStack

public ExpressionStack()

Method Detail

add

public void add(ExpressionObject e)
Adds an ExpressionObject as in an infix stream.

setClosingArgument

public void setClosingArgument(java.lang.Object arg)

process

public ExpressionObject process()
Takes the stream of ExpressionObjects in infix order via the method add(...) and generates a tree of ExpressionObjects.
Returns:
The root ExpressionObject of the new tree.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.