org.teatrove.tea.parsetree
Class CallExpression

java.lang.Object
  extended by org.teatrove.tea.parsetree.Node
      extended by org.teatrove.tea.parsetree.Expression
          extended by org.teatrove.tea.parsetree.CallExpression
All Implemented Interfaces:
Serializable, Cloneable, NullSafe
Direct Known Subclasses:
FunctionCallExpression, TemplateCallExpression

public abstract class CallExpression
extends Expression
implements NullSafe

Author:
Brian S O'Neill
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.teatrove.tea.parsetree.Expression
Expression.Conversion
 
Constructor Summary
CallExpression(SourceInfo info, Expression expression, Name target, ExpressionList params, Block subParam)
           
 
Method Summary
 Object clone()
          Returns a clone of this Node and all its children.
 Expression getExpression()
           
 Statement getInitializer()
          Initializer is a section of code that executes before the substitution param.
 ExpressionList getParams()
           
 Block getSubstitutionParam()
           
 Name getTarget()
           
 boolean isExceptionPossible()
          Returns true if an exception can be thrown while executing this Expression.
 boolean isNullSafe()
           
 boolean isVoidPermitted()
          A CallExpression is permitted to return void only in certain cases.
 void setExpression(Expression expression)
           
 void setInitializer(Statement stmt)
           
 void setNullSafe(boolean nullSafe)
           
 void setParams(ExpressionList params)
           
 void setSubstitutionParam(Block subParam)
           
 void setTarget(Name target)
           
 void setVoidPermitted(boolean b)
           
 
Methods inherited from class org.teatrove.tea.parsetree.Expression
accept, convertTo, convertTo, forceConversion, getConversionChain, getInitialType, getType, getValue, isValueKnown, setInitialType, setType
 
Methods inherited from class org.teatrove.tea.parsetree.Node
getSourceInfo, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CallExpression

public CallExpression(SourceInfo info,
                      Expression expression,
                      Name target,
                      ExpressionList params,
                      Block subParam)
Method Detail

clone

public Object clone()
Description copied from class: Node
Returns a clone of this Node and all its children. Immutable child objects are not necessarily cloned

Overrides:
clone in class Expression

isExceptionPossible

public boolean isExceptionPossible()
Description copied from class: Expression
Returns true if an exception can be thrown while executing this Expression. By default, returns true only if a type conversion could cause an exception.

Overrides:
isExceptionPossible in class Expression

getTarget

public Name getTarget()

setTarget

public void setTarget(Name target)

getExpression

public Expression getExpression()

setExpression

public void setExpression(Expression expression)

getParams

public ExpressionList getParams()

getInitializer

public Statement getInitializer()
Initializer is a section of code that executes before the substitution param. By default, it is null. If a CallExpression has a substitution param, a type checker may define an initializer.


getSubstitutionParam

public Block getSubstitutionParam()

isVoidPermitted

public boolean isVoidPermitted()
A CallExpression is permitted to return void only in certain cases. By default this method returns false.


setParams

public void setParams(ExpressionList params)

setInitializer

public void setInitializer(Statement stmt)

setSubstitutionParam

public void setSubstitutionParam(Block subParam)

setVoidPermitted

public void setVoidPermitted(boolean b)

isNullSafe

public boolean isNullSafe()
Specified by:
isNullSafe in interface NullSafe

setNullSafe

public void setNullSafe(boolean nullSafe)
Specified by:
setNullSafe in interface NullSafe


Copyright © 1997-2012 TeaTrove.org. All Rights Reserved.