symbolHandling
Class StringSymbol
java.lang.Object
symbolHandling.AbstractSymbol
symbolHandling.StringSymbol
public class StringSymbol
- extends AbstractSymbol
String table entry for string constants.
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 java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StringSymbol
public StringSymbol(java.lang.String str,
int len,
int index)
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 objects
- 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