symbolHandling
Class BoolConst

java.lang.Object
  extended by symbolHandling.BoolConst

public class BoolConst
extends java.lang.Object

This clas encapsulates all aspects of code generation for boolean constants. String constants and Int constants are handled by StringTable and IntTable respectively, but since there are only two boolean constants, we handle them here.


Field Summary
static BoolConst falsebool
           
static BoolConst truebool
           
 
Constructor Summary
BoolConst(boolean val)
          Creates a new boolean constant.
BoolConst(java.lang.Boolean val)
          Creates a new boolean constant.
 
Method Summary
 void codeDef(int boolclasstag, java.io.PrintWriter s)
          Generates code for the boolean constant definition.
 void codeRef(java.io.PrintWriter s)
          Emits a reference to this boolean constant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

truebool

public static final BoolConst truebool

falsebool

public static final BoolConst falsebool
Constructor Detail

BoolConst

public BoolConst(boolean val)
Creates a new boolean constant.

Parameters:
val - the value

BoolConst

public BoolConst(java.lang.Boolean val)
Creates a new boolean constant.

Parameters:
val - the value
Method Detail

codeRef

public void codeRef(java.io.PrintWriter s)
Emits a reference to this boolean constant.

Parameters:
s - the output stream

codeDef

public void codeDef(int boolclasstag,
                    java.io.PrintWriter s)
Generates code for the boolean constant definition.

Parameters:
boolclasstag - the class tag for string object
s - the output stream