symbolHandling
Class StringSymbol

java.lang.Object
  extended by symbolHandling.AbstractSymbol
      extended by symbolHandling.StringSymbol

public class StringSymbol
extends AbstractSymbol

String table entry for string constants.


Field Summary
 
Fields inherited from class symbolHandling.AbstractSymbol
index, str
 
Constructor Summary
StringSymbol(java.lang.String str, int len, int index)
           
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this symbol
 void codeDef(int stringclasstag, java.io.PrintWriter s)
          Generates code for the string constant definition.
 void codeRef(java.io.PrintWriter s)
          Emits a reference to this string constant.
 
Methods inherited from class symbolHandling.AbstractSymbol
equals, equalsIndex, equalString, getString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringSymbol

public StringSymbol(java.lang.String str,
                    int len,
                    int index)
Method Detail

codeDef

public void codeDef(int stringclasstag,
                    java.io.PrintWriter s)
Generates code for the string constant definition. This method is incomplete; you get to finish it up in programming assignment 5.

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

codeRef

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

Parameters:
s - the output stream

clone

public java.lang.Object clone()
Returns a copy of this symbol

Specified by:
clone in class AbstractSymbol