com.ibm.wala.shrikeCT
Class ClassWriter.RawElement

java.lang.Object
  extended by com.ibm.wala.shrikeCT.ClassWriter.Element
      extended by com.ibm.wala.shrikeCT.ClassWriter.RawElement
Enclosing class:
ClassWriter

public static final class ClassWriter.RawElement
extends ClassWriter.Element

A RawElement is an Element that is already available as some chunk of a byte buffer.


Constructor Summary
ClassWriter.RawElement(byte[] buf, int offset, int len)
          Create an Element for the 'len' bytes in 'buf' at offset 'offset'.
 
Method Summary
 int copyInto(byte[] dest, int destOffset)
          Copy the bytes into 'buf' at offset 'offset'.
 int getSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassWriter.RawElement

public ClassWriter.RawElement(byte[] buf,
                              int offset,
                              int len)
Create an Element for the 'len' bytes in 'buf' at offset 'offset'.

Method Detail

getSize

public int getSize()
Specified by:
getSize in class ClassWriter.Element
Returns:
the number of bytes that will be generated.

copyInto

public int copyInto(byte[] dest,
                    int destOffset)
Description copied from class: ClassWriter.Element
Copy the bytes into 'buf' at offset 'offset'.

Specified by:
copyInto in class ClassWriter.Element
Returns:
the number of bytes copies, which must be equal to getSize()