Class ExceptionsWriter
java.lang.Object
com.ibm.wala.shrike.shrikeCT.ClassWriter.Element
com.ibm.wala.shrike.shrikeCT.ExceptionsWriter
This class builds serializable Exceptions attributes.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
copyInto
(byte[] buf, int offset) Copy the bytes into 'buf' at offset 'offset'.int
getSize()
void
setRawTable
(int[] exceptions) Set the list of exceptions that can be thrown.
-
Constructor Details
-
ExceptionsWriter
Build an empty writer.- Throws:
IllegalArgumentException
- if w is null
-
-
Method Details
-
getSize
public int getSize()- Specified by:
getSize
in classClassWriter.Element
- Returns:
- the number of bytes that will be generated.
-
copyInto
Description copied from class:ClassWriter.Element
Copy the bytes into 'buf' at offset 'offset'.- Specified by:
copyInto
in classClassWriter.Element
- Returns:
- the number of bytes copies, which must be equal to getSize()
- Throws:
IllegalArgumentException
-
setRawTable
public void setRawTable(int[] exceptions) Set the list of exceptions that can be thrown.- Parameters:
exceptions
- an array of indices to constant pool Class entries- Throws:
IllegalArgumentException
- if exceptions is null
-