com.caucho.bytecode
Class ByteCodeWriter

java.lang.Object
  extended by com.caucho.bytecode.ByteCodeWriter

public class ByteCodeWriter
extends java.lang.Object

Interface to the bytecode compiler.


Method Summary
 JavaClass getJavaClass()
          Returns the java class for the writer.
 void write(byte[] buffer, int offset, int length)
          Writes a buffer
 void write(int v)
          Writes a byte
 void writeClass(java.lang.String className)
          Writes a class constant.
 void writeDouble(double v)
          Writes a double
 void writeFloat(float v)
          Writes a float
 void writeInt(int v)
          Writes an int
 void writeIntUTF8(java.lang.String value)
          Writes UTF-8
 void writeLong(long v)
          Writes an int
 void writeShort(int v)
          Writes a short.
 void writeUTF8(ByteBuffer bb, java.lang.String value)
          Writes UTF-8
 void writeUTF8(java.lang.String value)
          Writes UTF-8
 void writeUTF8Const(java.lang.String value)
          Writes a UTF8 constant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getJavaClass

public JavaClass getJavaClass()
Returns the java class for the writer.


writeClass

public void writeClass(java.lang.String className)
                throws java.io.IOException
Writes a class constant.

Throws:
java.io.IOException

writeUTF8Const

public void writeUTF8Const(java.lang.String value)
                    throws java.io.IOException
Writes a UTF8 constant.

Throws:
java.io.IOException

write

public void write(int v)
           throws java.io.IOException
Writes a byte

Throws:
java.io.IOException

write

public void write(byte[] buffer,
                  int offset,
                  int length)
           throws java.io.IOException
Writes a buffer

Throws:
java.io.IOException

writeShort

public void writeShort(int v)
                throws java.io.IOException
Writes a short.

Throws:
java.io.IOException

writeInt

public void writeInt(int v)
              throws java.io.IOException
Writes an int

Throws:
java.io.IOException

writeLong

public void writeLong(long v)
               throws java.io.IOException
Writes an int

Throws:
java.io.IOException

writeFloat

public void writeFloat(float v)
                throws java.io.IOException
Writes a float

Throws:
java.io.IOException

writeDouble

public void writeDouble(double v)
                 throws java.io.IOException
Writes a double

Throws:
java.io.IOException

writeUTF8

public void writeUTF8(java.lang.String value)
               throws java.io.IOException
Writes UTF-8

Throws:
java.io.IOException

writeIntUTF8

public void writeIntUTF8(java.lang.String value)
                  throws java.io.IOException
Writes UTF-8

Throws:
java.io.IOException

writeUTF8

public void writeUTF8(ByteBuffer bb,
                      java.lang.String value)
Writes UTF-8