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

java.lang.Object
  extended by org.ow2.opensuit.cel.impl.tree.impl.ast.AstNode
      extended by org.ow2.opensuit.cel.impl.tree.impl.ast.AstProperty
          extended by org.ow2.opensuit.cel.impl.tree.impl.ast.AstBracket
All Implemented Interfaces:
IExpression, IExprNode

public class AstBracket
extends AstProperty


Field Summary
protected  AstNode property
           
 
Fields inherited from class org.ow2.opensuit.cel.impl.tree.impl.ast.AstProperty
lvalue, prefix
 
Fields inherited from class org.ow2.opensuit.cel.impl.tree.impl.ast.AstNode
position
 
Constructor Summary
AstBracket(int position, AstNode base, AstNode property, boolean lvalue)
           
 
Method Summary
protected  void appendExpressionString(java.lang.StringBuilder builder)
          Recursive method to build an expression string form.
protected  void appendValuePattern(java.lang.StringBuilder builder)
          Recursive method to build the returned values regular expression.
 boolean compile(ITypeConverter converter, ICompilationContext ctx, ICompilationResultWriter messages)
          Allow to compile the given expression with the associated and .
 java.lang.reflect.Type getGenericType()
          Returns the expression generic type
 java.lang.Class<?> getType()
          Returns the expression type
 java.lang.Object invoke(IEvaluationContext iContext)
          Evaluates the expression.
 boolean isReadOnly()
          Returns true if the expression cannot be set
 boolean isStaticValue()
          Returns true if the expression has a static value (i.e. that does not depend on any evaluation context).
 void set(IEvaluationContext iContext, java.lang.Object iValue)
          Assigns a value to this expression (if no read only)
 
Methods inherited from class org.ow2.opensuit.cel.impl.tree.impl.ast.AstNode
getExpressionString, getPosition, getValuePattern, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

property

protected final AstNode property
Constructor Detail

AstBracket

public AstBracket(int position,
                  AstNode base,
                  AstNode property,
                  boolean lvalue)
Method Detail

compile

public boolean compile(ITypeConverter converter,
                       ICompilationContext ctx,
                       ICompilationResultWriter messages)
Description copied from interface: IExprNode
Allow to compile the given expression with the associated and . All messages will be stored into the at the end of the performed compilation.

Parameters:
converter - Interface for conversion types
ctx - Interface for compilation context
messages - Represent where the messages compilation will be stored
Returns:

invoke

public java.lang.Object invoke(IEvaluationContext iContext)
                        throws java.lang.Exception
Description copied from interface: IExpression
Evaluates the expression.

Throws:
java.lang.Exception

getType

public java.lang.Class<?> getType()
Description copied from interface: IExpression
Returns the expression type


getGenericType

public java.lang.reflect.Type getGenericType()
Description copied from interface: IExpression
Returns the expression generic type


set

public void set(IEvaluationContext iContext,
                java.lang.Object iValue)
         throws ExpressionEvaluationException
Description copied from interface: IExpression
Assigns a value to this expression (if no read only)

Throws:
ExpressionEvaluationException

isStaticValue

public boolean isStaticValue()
Description copied from interface: IExpression
Returns true if the expression has a static value (i.e. that does not depend on any evaluation context). In such a case, the invoke(...) method may be called with a null evaluation context.

Returns:
boolean

isReadOnly

public boolean isReadOnly()
Description copied from interface: IExpression
Returns true if the expression cannot be set

Returns:
boolean

appendExpressionString

protected void appendExpressionString(java.lang.StringBuilder builder)
Description copied from class: AstNode
Recursive method to build an expression string form.

Specified by:
appendExpressionString in class AstNode

appendValuePattern

protected void appendValuePattern(java.lang.StringBuilder builder)
Description copied from class: AstNode
Recursive method to build the returned values regular expression. This is used for advanced validation.

Specified by:
appendValuePattern in class AstNode


Copyright © 2008-2010 eBMWebsourcing. All Rights Reserved.