ca
Class CodeLine

java.lang.Object
  extended by ca.CodeLine

public class CodeLine
extends java.lang.Object

This class encapsulates a single line of assembly of disassembly.


Constructor Summary
CodeLine(java.lang.String code)
          This constructs a new CodeLine with the given original text.
 
Method Summary
 int getAddress()
          This method returns this instruction's memory address.
 java.lang.String getComment()
          This method returns the instructions comment or null if there is none.
 int[] getData()
          This method returns the raw binary data for this instruction.
 java.util.List<java.lang.String> getLabels()
          This method returns all labels attached to this assembly line.
 Opcode getOpcode()
           
 java.lang.String getOpcodeString()
           
 java.lang.String getOriginalText()
          This method returns the original line of code (before any processing).
 java.lang.String getSpecialCommentData()
          This method returns the data of a system-targeted comment.
 void setAddress(int address)
           
 void setComment(java.lang.String comment)
           
 void setData(int[] data)
           
 void setOpcode(Opcode opcode)
           
 void setOriginalText(java.lang.String originalText)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeLine

public CodeLine(java.lang.String code)
This constructs a new CodeLine with the given original text. The line fragments are parsed out, but no opcode parsing is done.

Parameters:
code - the original line of code
Method Detail

getSpecialCommentData

public java.lang.String getSpecialCommentData()
This method returns the data of a system-targeted comment. These comments begin with ##. If the comment is not for the system this method returns null.

Returns:
the system-targeted comment data or null if not a system-target

getLabels

public java.util.List<java.lang.String> getLabels()
This method returns all labels attached to this assembly line. This only applies to assembly code ... not disassembly.

Returns:

getAddress

public int getAddress()
This method returns this instruction's memory address.

Returns:
instruction's memory address

getData

public int[] getData()
This method returns the raw binary data for this instruction.

Returns:
instruction's raw binary data

getComment

public java.lang.String getComment()
This method returns the instructions comment or null if there is none.

Returns:
the comment or null

getOriginalText

public java.lang.String getOriginalText()
This method returns the original line of code (before any processing).

Returns:
the original line

setAddress

public void setAddress(int address)

setData

public void setData(int[] data)

setComment

public void setComment(java.lang.String comment)

setOriginalText

public void setOriginalText(java.lang.String originalText)

setOpcode

public void setOpcode(Opcode opcode)

getOpcode

public Opcode getOpcode()

getOpcodeString

public java.lang.String getOpcodeString()