public class CodeAttribute extends Attribute
Modifier and Type | Class and Description |
---|---|
static class |
CodeAttribute.ExceptionItem |
static class |
CodeAttribute.ExportAnalyzer |
Constructor and Description |
---|
CodeAttribute() |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(Attribute attr)
Adds an attribute.
|
void |
addException(ClassConstant type,
int start,
int end,
int handler)
Returns the exceptions.
|
Attribute |
export(JavaClass source,
JavaClass target)
Clones the attribute
|
void |
exportCode(JavaClass source,
JavaClass target)
Exports code.
|
java.util.ArrayList<Attribute> |
getAttributes()
Returns the exceptions.
|
byte[] |
getCode()
Gets the code value.
|
java.util.ArrayList<CodeAttribute.ExceptionItem> |
getExceptions()
Returns the exceptions.
|
JavaClass |
getJavaClass() |
int |
getMaxLocals()
Returns the max locals.
|
int |
getMaxStack()
Returns the max stack.
|
void |
read(ByteCodeParser in)
Writes the field to the output.
|
Attribute |
removeAttribute(java.lang.String name)
Removes an attribute.
|
void |
setAttributes(java.util.ArrayList<Attribute> attributes)
Returns the exceptions.
|
void |
setCode(byte[] code)
Sets the code value.
|
void |
setJavaClass(JavaClass jClass) |
void |
setMaxLocals(int max)
Sets the max locals.
|
void |
setMaxStack(int max)
Sets the max stack.
|
java.lang.String |
toString() |
void |
write(ByteCodeWriter out)
Writes the field to the output.
|
addConstants, getName
public void setJavaClass(JavaClass jClass)
public JavaClass getJavaClass()
public int getMaxLocals()
public void setMaxLocals(int max)
public int getMaxStack()
public void setMaxStack(int max)
public void setCode(byte[] code)
public byte[] getCode()
public void addAttribute(Attribute attr)
public java.util.ArrayList<Attribute> getAttributes()
public void setAttributes(java.util.ArrayList<Attribute> attributes)
public Attribute removeAttribute(java.lang.String name)
public java.util.ArrayList<CodeAttribute.ExceptionItem> getExceptions()
public void addException(ClassConstant type, int start, int end, int handler)
public void read(ByteCodeParser in) throws java.io.IOException
java.io.IOException
public void write(ByteCodeWriter out) throws java.io.IOException
public void exportCode(JavaClass source, JavaClass target) throws java.lang.Exception
java.lang.Exception