Package org.vesalainen.bcc
Class CodeAttribute
- java.lang.Object
-
- org.vesalainen.bcc.AttributeInfo
-
- org.vesalainen.bcc.CodeAttribute
-
- All Implemented Interfaces:
Writable
public class CodeAttribute extends AttributeInfo
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<AttributeInfo>attributesprivate byte[]codeprivate ExceptionTable[]exception_tableprivate intmax_localsprivate intmax_stack-
Fields inherited from class org.vesalainen.bcc.AttributeInfo
attribute_length, attribute_name_index, classFile
-
-
Constructor Summary
Constructors Constructor Description CodeAttribute(ClassFile cf, int attribute_name_index, int attribute_length, java.io.DataInput in)CodeAttribute(SubClass cf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLineNumberTable(LineNumberTable lnt)voidaddLocalVariables(java.util.List<? extends javax.lang.model.element.VariableElement> localVariables)private intattributeLength()java.util.List<? extends AttributeInfo>getAttributes()byte[]getCode()intgetMax_locals()intgetMax_stack()voidsetCode(byte[] code, ExceptionTable... exception_table)voidsetMax_locals(int max_locals)voidsetMax_stack(int max_stack)voidwrite(java.io.DataOutput out)-
Methods inherited from class org.vesalainen.bcc.AttributeInfo
getAttributeSize, getInstance, isOfType
-
-
-
-
Field Detail
-
max_stack
private int max_stack
-
max_locals
private int max_locals
-
code
private byte[] code
-
exception_table
private ExceptionTable[] exception_table
-
attributes
private java.util.List<AttributeInfo> attributes
-
-
Method Detail
-
addLocalVariables
public void addLocalVariables(java.util.List<? extends javax.lang.model.element.VariableElement> localVariables)
-
addLineNumberTable
public void addLineNumberTable(LineNumberTable lnt)
-
write
public void write(java.io.DataOutput out) throws java.io.IOException- Specified by:
writein interfaceWritable- Overrides:
writein classAttributeInfo- Throws:
java.io.IOException
-
getCode
public byte[] getCode()
-
setCode
public void setCode(byte[] code, ExceptionTable... exception_table)
-
getMax_locals
public int getMax_locals()
-
setMax_locals
public void setMax_locals(int max_locals)
-
getMax_stack
public int getMax_stack()
-
setMax_stack
public void setMax_stack(int max_stack)
-
getAttributes
public java.util.List<? extends AttributeInfo> getAttributes()
-
attributeLength
private int attributeLength()
-
-