public final class CodeWriter extends ClassWriter.Element
| Constructor and Description |
|---|
CodeWriter(ClassWriter w)
Build an empty serializable Code attribute.
|
| Modifier and Type | Method and Description |
|---|---|
int |
copyInto(byte[] buf,
int offset)
Copy the bytes into 'buf' at offset 'offset'.
|
int |
getCodeLength() |
int |
getSize() |
void |
setAttributes(ClassWriter.Element[] attributes)
Set the attributes of this Code.
|
void |
setCode(byte[] code)
Set the bytecodes for this Code attribute.
|
void |
setMaxLocals(int maxLocals)
Set the maximum number of local variable space used, in words, by this Code.
|
void |
setMaxStack(int maxStack)
Set the maximum stack size, in words, in this Code.
|
void |
setRawHandlers(int[] exnHandlers)
Set the raw handler data for this Code attribute.
|
public CodeWriter(ClassWriter w)
IllegalArgumentException - if w is nullpublic int getCodeLength()
throws IllegalStateException
IllegalStateExceptionpublic int getSize()
throws IllegalArgumentException
getSize in class ClassWriter.ElementIllegalArgumentExceptionpublic int copyInto(byte[] buf,
int offset)
throws IllegalArgumentException
ClassWriter.ElementcopyInto in class ClassWriter.ElementIllegalArgumentExceptionpublic void setCode(byte[] code)
throws IllegalArgumentException
IllegalArgumentException - if code is nullpublic void setRawHandlers(int[] exnHandlers)
exnHandlers - a flattened sequence of (startPC, endPC, catchClassIndex, catchPC) tuplesIllegalArgumentException - if exnHandlers is nullpublic void setMaxLocals(int maxLocals)
public void setMaxStack(int maxStack)
public void setAttributes(ClassWriter.Element[] attributes)
Copyright © 2019. All rights reserved.