gnu.expr
Class LitTable
java.lang.Object
gnu.expr.LitTable
- All Implemented Interfaces:
- java.io.DataOutput, java.io.ObjectOutput
public class LitTable
- extends java.lang.Object
- implements java.io.ObjectOutput
Manages the literals of a Compilation.
Implements ObjectOutput, because we use externalization to determine
how literals get compiled into code that re-creates the literal.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LitTable
public LitTable(Compilation comp)
emit
public void emit()
throws java.io.IOException
- Throws:
java.io.IOException
flush
public void flush()
- Specified by:
flush
in interface java.io.ObjectOutput
close
public void close()
- Specified by:
close
in interface java.io.ObjectOutput
write
public void write(int b)
throws java.io.IOException
- Specified by:
write
in interface java.io.DataOutput
- Specified by:
write
in interface java.io.ObjectOutput
- Throws:
java.io.IOException
writeBytes
public void writeBytes(java.lang.String s)
throws java.io.IOException
- Specified by:
writeBytes
in interface java.io.DataOutput
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Specified by:
write
in interface java.io.DataOutput
- Specified by:
write
in interface java.io.ObjectOutput
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Specified by:
write
in interface java.io.DataOutput
- Specified by:
write
in interface java.io.ObjectOutput
- Throws:
java.io.IOException
writeBoolean
public void writeBoolean(boolean v)
- Specified by:
writeBoolean
in interface java.io.DataOutput
writeChar
public void writeChar(int v)
- Specified by:
writeChar
in interface java.io.DataOutput
writeByte
public void writeByte(int v)
- Specified by:
writeByte
in interface java.io.DataOutput
writeShort
public void writeShort(int v)
- Specified by:
writeShort
in interface java.io.DataOutput
writeInt
public void writeInt(int v)
- Specified by:
writeInt
in interface java.io.DataOutput
writeLong
public void writeLong(long v)
- Specified by:
writeLong
in interface java.io.DataOutput
writeFloat
public void writeFloat(float v)
- Specified by:
writeFloat
in interface java.io.DataOutput
writeDouble
public void writeDouble(double v)
- Specified by:
writeDouble
in interface java.io.DataOutput
writeUTF
public void writeUTF(java.lang.String v)
- Specified by:
writeUTF
in interface java.io.DataOutput
writeChars
public void writeChars(java.lang.String v)
- Specified by:
writeChars
in interface java.io.DataOutput
writeObject
public void writeObject(java.lang.Object obj)
throws java.io.IOException
- Specified by:
writeObject
in interface java.io.ObjectOutput
- Throws:
java.io.IOException
findLiteral
public Literal findLiteral(java.lang.Object value)