org.apache.beehive.netui.script
Class Expression

Object
  extended by Expression

public abstract class Expression
extends Object

This class implements support for an Expression object. It provides access to metadata about the parsed expression including the data binding context and tokens that constitute the expression.


Constructor Summary
Expression()
           
 
Method Summary
abstract  String getContext()
          Get the expression's data binding context.
abstract  String getExpression(int start)
          Return an expression that is created starting with the token at the given index.
abstract  List getTokens()
          Get the expression's token list.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Expression

public Expression()
Method Detail

getContext

public abstract String getContext()
Get the expression's data binding context.

Returns:
the implicit object that this expression references

getTokens

public abstract List getTokens()
Get the expression's token list. For an expression that looks like "actionForm.customer.name", this will include the tokens "actionForm", "customer", and "name".

Returns:
the list of tokens contained in the expression

getExpression

public abstract String getExpression(int start)
Return an expression that is created starting with the token at the given index.

Parameters:
start - the token index at which to build the sub-expression
Returns:
a sub-expression starting with the token referenced by start
Throws:
IllegalStateException - if the provided start token is out of bounds given the number of tokens in the expression.