javar.attributes
Class CodeHandler

java.lang.Object
  |
  +--javar.attributes.CodeHandler

public class CodeHandler
extends Object

This is a handler for the code attribute

Author:
Ben Litchfield

Constructor Summary
CodeHandler(ConstantPool p)
          Constructor
 
Method Summary
 long getEndAddress()
          This will get the ending address of this handler.
 long getStartAddress()
          This will get the starting address of this handler.
 long getStartHandler()
          This will get the starting address of the catch block
 void load(DataInputStream in)
          This will load in the data for the handler
 void setEndAddress(long e)
          This will set the ending address of this handler
 void setStartAddress(long s)
          This will set the starting address of this handler
 void setStartHandler(long s)
          This will set the starting address of the catch block
 byte[] toBytes()
          This will take this attribute and convert it into an array of bytes that can be stored in a classfile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeHandler

public CodeHandler(ConstantPool p)
Constructor

Method Detail

getStartAddress

public long getStartAddress()
This will get the starting address of this handler.

Returns:
the start address of this handler

setStartAddress

public void setStartAddress(long s)
This will set the starting address of this handler

Parameters:
s - The new starting address of the handler

getStartHandler

public long getStartHandler()
This will get the starting address of the catch block

Returns:
the start address of this handler

setStartHandler

public void setStartHandler(long s)
This will set the starting address of the catch block

Parameters:
s - The new starting address of the handler

getEndAddress

public long getEndAddress()
This will get the ending address of this handler.

Returns:
the end address of this handler

setEndAddress

public void setEndAddress(long e)
This will set the ending address of this handler

Parameters:
e - The new ending address of the handler

toBytes

public byte[] toBytes()
This will take this attribute and convert it into an array of bytes that can be stored in a classfile.

Returns:
array of bytes representing this attribute

load

public void load(DataInputStream in)
This will load in the data for the handler

Parameters:
in - the stream to read the data from