net.sf.rej.java.attribute
Class CodeAttribute

java.lang.Object
  extended by net.sf.rej.java.attribute.Attribute
      extended by net.sf.rej.java.attribute.CodeAttribute

public class CodeAttribute
extends Attribute


Nested Class Summary
static class CodeAttribute.OffsetTag
           
 
Constructor Summary
CodeAttribute(int nameIndex, ConstantPool pool)
           
CodeAttribute(int nameIndex, ConstantPool cp, int maxStack, int maxLocals)
           
 
Method Summary
 void dump(java.io.PrintStream out)
           
 Attributes getAttributes()
           
 Code getCode()
           
 Exceptions getExceptions()
           
 int getMaxLocals()
           
 int getMaxStackSize()
           
 java.util.Map<java.lang.Object,Range> getOffsetMap()
          Returns a map of offsets of each significant element of this method.
 byte[] getPayload()
           
 void setCode(Code code)
           
 void setMaxLocals(int locals)
           
 void setPayload(byte[] data)
           
 void setStackSize(int maxStack)
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.rej.java.attribute.Attribute
getAttribute, getData, getName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CodeAttribute

public CodeAttribute(int nameIndex,
                     ConstantPool pool)

CodeAttribute

public CodeAttribute(int nameIndex,
                     ConstantPool cp,
                     int maxStack,
                     int maxLocals)
Method Detail

getPayload

public byte[] getPayload()
Overrides:
getPayload in class Attribute

getOffsetMap

public java.util.Map<java.lang.Object,Range> getOffsetMap()
Returns a map of offsets of each significant element of this method. The offsets returned by this method are only valid until this object is modified. The keys in the map are of type OffsetTag, Attribute.

Returns:
a map of element offsets in class file data.

setPayload

public void setPayload(byte[] data)
Overrides:
setPayload in class Attribute

getCode

public Code getCode()

getMaxStackSize

public int getMaxStackSize()

setStackSize

public void setStackSize(int maxStack)

dump

public void dump(java.io.PrintStream out)

getAttributes

public Attributes getAttributes()

getExceptions

public Exceptions getExceptions()

setMaxLocals

public void setMaxLocals(int locals)

getMaxLocals

public int getMaxLocals()

toString

public java.lang.String toString()
Overrides:
toString in class Attribute

setCode

public void setCode(Code code)