org.ow2.opensuit.cel.impl.tree.impl.ast
Class AstNode

java.lang.Object
  extended by org.ow2.opensuit.cel.impl.tree.impl.ast.AstNode
All Implemented Interfaces:
IExpression, IExprNode
Direct Known Subclasses:
AstEval, AstIdentifier, AstProperty, AstRightValue, AstText

public abstract class AstNode
extends java.lang.Object
implements IExprNode


Field Summary
protected  int position
           
 
Constructor Summary
AstNode(int position)
           
 
Method Summary
protected abstract  void appendExpressionString(java.lang.StringBuilder builder)
          Recursive method to build an expression string form.
protected abstract  void appendValuePattern(java.lang.StringBuilder builder)
          Recursive method to build the returned values regular expression.
 java.lang.String getExpressionString()
          Builds the expression outer string form.
 int getPosition()
          Returns the node's start position (character) in the original expression string.
 java.lang.String getValuePattern()
          Builds the returned values regular expression.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ow2.opensuit.cel.impl.tree.IExprNode
compile
 
Methods inherited from interface org.ow2.opensuit.cel.IExpression
getGenericType, getType, invoke, isReadOnly, isStaticValue, set
 

Field Detail

position

protected int position
Constructor Detail

AstNode

public AstNode(int position)
Method Detail

getExpressionString

public final java.lang.String getExpressionString()
Builds the expression outer string form. This methods makes a StringBuilder and calls recursively appendExpressionString() on each child node.

Specified by:
getExpressionString in interface IExpression
Returns:
String

appendExpressionString

protected abstract void appendExpressionString(java.lang.StringBuilder builder)
Recursive method to build an expression string form.

Parameters:
builder -

getValuePattern

public final java.lang.String getValuePattern()
Builds the returned values regular expression. This methods makes a StringBuilder and calls recursively appendValuePattern() on each child node.

Specified by:
getValuePattern in interface IExpression
Returns:
String

appendValuePattern

protected abstract void appendValuePattern(java.lang.StringBuilder builder)
Recursive method to build the returned values regular expression. This is used for advanced validation.

Parameters:
builder -

toString

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

getPosition

public final int getPosition()
Returns the node's start position (character) in the original expression string.

Specified by:
getPosition in interface IExprNode


Copyright © 2008-2010 eBMWebsourcing. All Rights Reserved.