com.caucho.es.parser
Class CastExpr

java.lang.Object
|
+--com.caucho.es.parser.Expr
|
+--com.caucho.es.parser.CastExpr

class CastExpr
extends Expr

CastExpr represents casting.


Field Summary
private  Expr lhs
           
private  TypeExpr typeExpr
           
 
Fields inherited from class com.caucho.es.parser.Expr
block, cl, filename, function, isTop, javaType, line, noValue, type, TYPE_BOOLEAN, TYPE_ES, TYPE_INTEGER, TYPE_JAVA, TYPE_LONG, TYPE_NUMBER, TYPE_STRING, TYPE_UNKNOWN, TYPE_VOID, withDepth
 
Constructor Summary
private CastExpr(Block block, Expr lhs, TypeExpr typeExpr)
           
 
Method Summary
(package private) static CastExpr create(Block block, Expr lhs, TypeExpr typeExpr)
           
(package private)  int getType()
          Returns the JavaScript type class of the casted type.
(package private)  Expr getTypeExpr()
          Returns the actual type expression.
(package private)  void printBooleanImpl()
          Prints the casted expression when the result is a boolean
(package private)  void printImpl()
          Prints the casted expression when the result is a JavaScript object.
(package private)  void printInt32Impl()
          Prints the casted expression when the result is a 32-bit integer
(package private)  void printJavaImpl()
          Prints the casted expression when the result is a JavaExpression
(package private)  void printNumImpl()
          Prints the casted expression when the result is a number (double)
(package private)  void printStringImpl()
          Prints the casted expression when the result is a string
(package private)  void setUsed()
          Marks the value as being used.
 
Methods inherited from class com.caucho.es.parser.Expr
assign, binaryOp, cast, conditional, delete, doVoid, error, exprStatement, fieldReference, fieldReference, getFilename, getJavaClass, getLine, isNum, isNumeric, isSimple, killValue, next, postfix, prefix, print, printBoolean, printExpr, printInt32, printInt64, printInt64Impl, printJava, printJavaClass, printJavaString, printLiteral, printNum, printStr, printString, setBoolean, setTop, startCall, startNew, typeof, unaryOp
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

lhs

private Expr lhs

typeExpr

private TypeExpr typeExpr
Constructor Detail

CastExpr

private CastExpr(Block block,
Expr lhs,
TypeExpr typeExpr)
throws ESException
Method Detail

create

static CastExpr create(Block block,
Expr lhs,
TypeExpr typeExpr)
throws ESException

getType

int getType()
Returns the JavaScript type class of the casted type.
Overrides:
getType in class Expr

getTypeExpr

Expr getTypeExpr()
Returns the actual type expression.
Overrides:
getTypeExpr in class Expr

printImpl

void printImpl()
throws java.io.IOException
Prints the casted expression when the result is a JavaScript object.
Overrides:
printImpl in class Expr

printBooleanImpl

void printBooleanImpl()
throws java.io.IOException
Prints the casted expression when the result is a boolean
Overrides:
printBooleanImpl in class Expr

printInt32Impl

void printInt32Impl()
throws java.io.IOException
Prints the casted expression when the result is a 32-bit integer
Overrides:
printInt32Impl in class Expr

printNumImpl

void printNumImpl()
throws java.io.IOException
Prints the casted expression when the result is a number (double)
Overrides:
printNumImpl in class Expr

printStringImpl

void printStringImpl()
throws java.io.IOException
Prints the casted expression when the result is a string
Overrides:
printStringImpl in class Expr

printJavaImpl

void printJavaImpl()
throws java.io.IOException
Prints the casted expression when the result is a JavaExpression
Overrides:
printJavaImpl in class Expr

setUsed

void setUsed()
Marks the value as being used.
Overrides:
setUsed in class Expr