org.jclarion.clarion.runtime.expr
Class LabelExpr

java.lang.Object
  extended by org.jclarion.clarion.runtime.expr.CExpr
      extended by org.jclarion.clarion.runtime.expr.LabelExpr

public class LabelExpr
extends CExpr


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jclarion.clarion.runtime.expr.CExpr
CExpr.DeepIterator, CExpr.GenericOp, CExpr.JoinIterator, CExpr.OneIterator, CExpr.OpIterable, CExpr.OpIterator, CExpr.TwoIterator, CExpr.ZeroIterator
 
Constructor Summary
LabelExpr(java.lang.String name)
           
LabelExpr(java.lang.String name, java.util.List<CExpr> params)
           
 
Method Summary
 void cast(CExprType type)
          Force expr type to a new cast
 java.util.Iterator<CExpr> directChildren()
           
 ClarionObject eval()
          Generate result
 boolean generateString(java.lang.StringBuilder out, boolean strict)
          Generate SQL capable string.
 java.lang.String getName()
           
 CExprType getType()
          Work out expression type
 boolean isRecastableType()
          Return whether or not expression type is fixed.
 int precendence()
          Return order of precendence.
 
Methods inherited from class org.jclarion.clarion.runtime.expr.CExpr
cast, isRecastableType, iterator, resolveCasts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelExpr

public LabelExpr(java.lang.String name)

LabelExpr

public LabelExpr(java.lang.String name,
                 java.util.List<CExpr> params)
Method Detail

getName

public java.lang.String getName()

eval

public ClarionObject eval()
Description copied from class: CExpr
Generate result

Specified by:
eval in class CExpr
Returns:

precendence

public int precendence()
Description copied from class: CExpr
Return order of precendence. Low number = low order of precedence (i.e. bool etc) Hi number = high order of precendence (i.e. * % / etc ). Highest is constants When rebuilding expressions (i.e. SQL) you need to paran anything whose precendence is lower then yourself i.e. Sum(Prod,Prod) = 2*3 + 6*3 Prod(Sum,Sum) = (2+3) * (6+3)

Specified by:
precendence in class CExpr

directChildren

public java.util.Iterator<CExpr> directChildren()
Specified by:
directChildren in class CExpr

generateString

public boolean generateString(java.lang.StringBuilder out,
                              boolean strict)
Description copied from class: CExpr
Generate SQL capable string. if strict is false (not strict mode) then it will generate expression faithfully without consideration as to whether or not it will yield legal SQL If strict mode is set - then only faithful SQL will be yielded return result in this case will indicate whether or not this call of generateString yielded SQL. If a method returns false it must preserve StringBuilder as is e.g. Pow() will always return false. e.g. BoolExpr will return false if there are any 'OR' components which are not strict SQL

Specified by:
generateString in class CExpr

cast

public void cast(CExprType type)
Description copied from class: CExpr
Force expr type to a new cast

Specified by:
cast in class CExpr

getType

public CExprType getType()
Description copied from class: CExpr
Work out expression type

Specified by:
getType in class CExpr
Returns:

isRecastableType

public boolean isRecastableType()
Description copied from class: CExpr
Return whether or not expression type is fixed. i.e. cannot be easily recast

Specified by:
isRecastableType in class CExpr


Copyright © 2010. All Rights Reserved.