coins.ast.expr
クラス ConstantExpr

java.lang.Object
  |
  +--coins.ast.ASTree
        |
        +--coins.ast.expr.ConstantExpr
すべての実装インタフェース:
Expr, java.io.Serializable, TypeId
直系の既知のサブクラス:
FloatConstantExpr, IntConstantExpr

public abstract class ConstantExpr
extends ASTree
implements Expr, TypeId

Constant class. This class has been rewritten because the original ConstantExpr class does not hold type information when constant folding is done. Objects of ConstantExpr can not be changed as it is for String object. If you are tempted to change the value of constant object, you should construct new object instead of changing the value.

関連項目:
直列化された形式

フィールドの概要
protected  byte[] fType
           
 
インタフェース coins.ast.TypeId から継承したフィールド
ARRAY_T, CHAR_T, CONST_T, DOUBLE_T, ELLIPSIS_T, ENUM_BEGIN, ENUM_END, FLOAT_T, FUNCTION_T, INT_T, LONG_DOUBLE_T, LONG_LONG_T, LONG_T, NO_DIMENSION_T, OFFSET_T, POINTER_T, RESTRICT_T, RETURN_T, S_AUTO, S_EXTERN, S_INLINE, S_NONE, S_REGISTER, S_STATIC, SHORT_T, SIGNED_T, SIZE_T, STRUCT_BEGIN, STRUCT_END, UNION_BEGIN, UNION_END, UNSIGNED_T, VOID_T, VOLATILE_T
 
コンストラクタの概要
ConstantExpr()
           
 
メソッドの概要
 void accept(Visitor v)
          Is a method for the visitor pattern.
abstract  double doubleValue()
           
 ASTree getLeft()
           
 ASTree getRight()
           
abstract  char getSignChar()
           
 byte[] getType()
          Returns the type of the resulting value of evaluating the expression.
abstract  char getTypeChar()
           
abstract  long longValue()
           
 void setLeft(ASTree left)
           
 void setRight(ASTree right)
           
 
クラス coins.ast.ASTree から継承したメソッド
getTag, putSeparator, rightToString, toString, toString1
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

fType

protected byte[] fType
コンストラクタの詳細

ConstantExpr

public ConstantExpr()
メソッドの詳細

longValue

public abstract long longValue()

doubleValue

public abstract double doubleValue()

getSignChar

public abstract char getSignChar()

getTypeChar

public abstract char getTypeChar()

getLeft

public ASTree getLeft()
定義:
クラス ASTree 内の getLeft

getRight

public ASTree getRight()
定義:
クラス ASTree 内の getRight

setLeft

public void setLeft(ASTree left)
定義:
クラス ASTree 内の setLeft

setRight

public void setRight(ASTree right)
定義:
クラス ASTree 内の setRight

accept

public void accept(Visitor v)
クラス ASTree の記述:
Is a method for the visitor pattern. It calls atXXX() on the given visitor, where XXX is the class name of the node object.

定義:
クラス ASTree 内の accept

getType

public byte[] getType()
インタフェース Expr の記述:
Returns the type of the resulting value of evaluating the expression. See ast.TypeId

定義:
インタフェース Expr 内の getType
戻り値:
the encoded type.